summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2010-03-29 18:14:50 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2010-04-05 10:37:36 -0500
commitd994f4058d9f9be7e44529b55fc6be6552901ead (patch)
tree065d86bde3fbb8328642c0f5817d3bdcca358ad8
parent5b0fa207d1a6f27c9a2f2d707147dce01af21db7 (diff)
downloadblackbird-op-linux-d994f4058d9f9be7e44529b55fc6be6552901ead.tar.gz
blackbird-op-linux-d994f4058d9f9be7e44529b55fc6be6552901ead.zip
9p: drop nlink remove
We need to drop the link count on the inode of a sucessfull remove Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
-rw-r--r--fs/9p/vfs_inode.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 5fe45d692c9f..ae8396707707 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -431,6 +431,7 @@ error:
static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir)
{
+ int retval;
struct inode *file_inode;
struct v9fs_session_info *v9ses;
struct p9_fid *v9fid;
@@ -444,7 +445,10 @@ static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir)
if (IS_ERR(v9fid))
return PTR_ERR(v9fid);
- return p9_client_remove(v9fid);
+ retval = p9_client_remove(v9fid);
+ if (!retval)
+ drop_nlink(file_inode);
+ return retval;
}
static int
OpenPOWER on IntegriCloud