Skip to content

Commit

Permalink
ceph: fix dentry reference leak in encode_fh()
Browse files Browse the repository at this point in the history
Call to d_find_alias() needs a corresponding dput()

This fixes http://tracker.newdream.net/issues/3271

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
  • Loading branch information
David Zafman authored and Sage Weil committed Oct 29, 2012
1 parent 9bd9526 commit 52eb5a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ceph/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len,
*max_len = handle_length;
type = 255;
}
if (dentry)
dput(dentry);
return type;
}

Expand Down

0 comments on commit 52eb5a9

Please sign in to comment.