浏览代码

[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: 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>
Latchesar Ionkov 19 年之前
父节点
当前提交
9d7fa40098
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/9p/vfs_inode.c

+ 1 - 1
fs/9p/vfs_inode.c

@@ -300,7 +300,7 @@ clunk_fid:
 	fid = V9FS_NOFID;
 	fid = V9FS_NOFID;
 
 
 put_fid:
 put_fid:
-	if (fid >= 0)
+	if (fid != V9FS_NOFID)
 		v9fs_put_idpool(fid, &v9ses->fidpool);
 		v9fs_put_idpool(fid, &v9ses->fidpool);
 
 
 	kfree(fcall);
 	kfree(fcall);