All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org, Neil Brown <neilb@cse.unsw.edu.au>
Subject: [PATCH] nfsd/vfs.c: endianness fixes
Date: Sun, 25 Dec 2005 06:29:37 +0000	[thread overview]
Message-ID: <20051225062937.GW27946@ftp.linux.org.uk> (raw)

From: Al Viro <viro@zeniv.linux.org.uk>
Date: 1135476096 -0500

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

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

---

 fs/nfsd/vfs.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

38c78c8cfcd1be715fb280f83e2b1ce2f709abc8
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index af7c3c3..f237f98 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1134,7 +1134,7 @@ nfsd_create(struct svc_rqst *rqstp, stru
 				"nfsd_create: parent %s/%s not locked!\n",
 				dentry->d_parent->d_name.name,
 				dentry->d_name.name);
-			err = -EIO;
+			err = nfserr_io;
 			goto out;
 		}
 	}
@@ -1592,7 +1592,7 @@ nfsd_rename(struct svc_rqst *rqstp, stru
 	if ((ffhp->fh_export->ex_flags & NFSEXP_MSNFS) &&
 		((atomic_read(&odentry->d_count) > 1)
 		 || (atomic_read(&ndentry->d_count) > 1))) {
-			err = nfserr_perm;
+			err = -EPERM;
 	} else
 #endif
 	err = vfs_rename(fdir, odentry, tdir, ndentry);
@@ -1663,7 +1663,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
 #ifdef MSNFS
 		if ((fhp->fh_export->ex_flags & NFSEXP_MSNFS) &&
 			(atomic_read(&rdentry->d_count) > 1)) {
-			err = nfserr_perm;
+			err = -EPERM;
 		} else
 #endif
 		err = vfs_unlink(dirp, rdentry);
-- 
0.99.9.GIT


             reply	other threads:[~2005-12-25  6:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-25  6:29 Al Viro [this message]
2005-12-25  6:44 ` [PATCH] nfsd4_truncate() bogus return value Al Viro
2005-12-25  6:48 ` [PATCH] NFSERR_SERVERFAULT returned host-endian Al Viro
2005-12-25  6:49 ` [PATCH] nfsd4_lock() returns bogus values to clients Al Viro
2005-12-25  7:30   ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051225062937.GW27946@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.