Skip to content

Commit

Permalink
[PATCH] v9fs: fix fid check in v9fs_create
Browse files Browse the repository at this point in the history
Fix an incorrect check whether a fid was allocated in v9fs_create and if it
should be freed on error.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Latchesar Ionkov authored and Linus Torvalds committed Jun 28, 2006
1 parent 94374e7 commit 9d7fa40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ v9fs_create(struct v9fs_session_info *v9ses, u32 pfid, char *name, u32 perm,
fid = V9FS_NOFID;

put_fid:
if (fid >= 0)
if (fid != V9FS_NOFID)
v9fs_put_idpool(fid, &v9ses->fidpool);

kfree(fcall);
Expand Down

0 comments on commit 9d7fa40

Please sign in to comment.