Commit d994f405 authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Eric Van Hensbergen

9p: drop nlink remove

We need to drop the link count on the inode of a sucessfull remove
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
parent 5b0fa207
...@@ -431,6 +431,7 @@ v9fs_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid, ...@@ -431,6 +431,7 @@ v9fs_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid,
static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir) static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir)
{ {
int retval;
struct inode *file_inode; struct inode *file_inode;
struct v9fs_session_info *v9ses; struct v9fs_session_info *v9ses;
struct p9_fid *v9fid; struct p9_fid *v9fid;
...@@ -444,7 +445,10 @@ static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir) ...@@ -444,7 +445,10 @@ static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir)
if (IS_ERR(v9fid)) if (IS_ERR(v9fid))
return PTR_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 static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment