提交 9d7fa400 编写于 作者: L Latchesar Ionkov 提交者: Linus Torvalds

[PATCH] v9fs: fix fid check in v9fs_create

Fix an incorrect check whether a fid was allocated in v9fs_create and if it
should be freed on error.
Signed-off-by: NLatchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 94374e7c
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册