瀏覽代碼

[PATCH] nfsd/vfs.c: endianness fixes

Several failure exits return -E<something> instead of nfserr_<something> and
vice versa.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro 19 年之前
父節點
當前提交
d75f2b9f5d
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      fs/nfsd/vfs.c

+ 3 - 3
fs/nfsd/vfs.c

@@ -1134,7 +1134,7 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
 				"nfsd_create: parent %s/%s not locked!\n",
 				"nfsd_create: parent %s/%s not locked!\n",
 				dentry->d_parent->d_name.name,
 				dentry->d_parent->d_name.name,
 				dentry->d_name.name);
 				dentry->d_name.name);
-			err = -EIO;
+			err = nfserr_io;
 			goto out;
 			goto out;
 		}
 		}
 	}
 	}
@@ -1600,7 +1600,7 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen,
 	if ((ffhp->fh_export->ex_flags & NFSEXP_MSNFS) &&
 	if ((ffhp->fh_export->ex_flags & NFSEXP_MSNFS) &&
 		((atomic_read(&odentry->d_count) > 1)
 		((atomic_read(&odentry->d_count) > 1)
 		 || (atomic_read(&ndentry->d_count) > 1))) {
 		 || (atomic_read(&ndentry->d_count) > 1))) {
-			err = nfserr_perm;
+			err = -EPERM;
 	} else
 	} else
 #endif
 #endif
 	err = vfs_rename(fdir, odentry, tdir, ndentry);
 	err = vfs_rename(fdir, odentry, tdir, ndentry);
@@ -1672,7 +1672,7 @@ nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
 #ifdef MSNFS
 #ifdef MSNFS
 		if ((fhp->fh_export->ex_flags & NFSEXP_MSNFS) &&
 		if ((fhp->fh_export->ex_flags & NFSEXP_MSNFS) &&
 			(atomic_read(&rdentry->d_count) > 1)) {
 			(atomic_read(&rdentry->d_count) > 1)) {
-			err = nfserr_perm;
+			err = -EPERM;
 		} else
 		} else
 #endif
 #endif
 		err = vfs_unlink(dirp, rdentry);
 		err = vfs_unlink(dirp, rdentry);