From: Eric Van Hensbergen <ericvh@hera.kernel.org>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org,
v9fs-developer@lists.sourceforge.net, ericvh@gmail.com
Subject: [PATCH] 9p: fix fid behavior on failed remove
Date: Sat, 29 Jul 2006 23:16:34 GMT [thread overview]
Message-ID: <200607292316.k6TNGYDS017029@hera.kernel.org> (raw)
>From 188a447b579a96ef485ee6911f0e6f7d520f896a Mon Sep 17 00:00:00 2001
From: Eric Van Hensbergen <ericvh@gmail.com>
Date: Sat, 29 Jul 2006 18:13:49 -0500
Subject: [PATCH] 9p: fix fid behavior on failed remove
Fix fid behavior on failed remove.
Based on a bug report from Russ Ross <russruss@gmail.com>
According to the spec:
"The remove request asks the file server both to remove the file
represented by fid and to clunk the fid, even if the remove fails."
but the Linux client seems to expect the fid to be valid after a
failed remove attempt. Specifically, I'm getting this behavior when
attempting to remove a non-empty directory.
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
---
fs/9p/vfs_inode.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 61ce38d..91a0ea5 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -433,10 +433,10 @@ static int v9fs_remove(struct inode *dir
result = v9fs_t_remove(v9ses, fid, &fcall);
if (result < 0) {
PRINT_FCALL_ERROR("remove fails", fcall);
- } else {
- v9fs_put_idpool(fid, &v9ses->fidpool);
- v9fs_fid_destroy(v9fid);
- }
+ }
+
+ v9fs_put_idpool(fid, &v9ses->fidpool);
+ v9fs_fid_destroy(v9fid);
kfree(fcall);
return result;
--
1.4.2.rc1.g83e1
reply other threads:[~2006-07-29 23:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200607292316.k6TNGYDS017029@hera.kernel.org \
--to=ericvh@hera.kernel.org \
--cc=akpm@osdl.org \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=v9fs-developer@lists.sourceforge.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome