Skip to content

Commit

Permalink
9p: drop nlink remove
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aneesh Kumar K.V authored and Eric Van Hensbergen committed Apr 5, 2010
1 parent 5b0fa20 commit d994f40
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
int retval;
struct inode *file_inode;
struct v9fs_session_info *v9ses;
struct p9_fid *v9fid;
Expand All @@ -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
Expand Down

0 comments on commit d994f40

Please sign in to comment.