From: Latchesar Ionkov Date: Wed, 28 Jun 2006 11:26:51 +0000 (-0700) Subject: [PATCH] v9fs: fix fid check in v9fs_create X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9d7fa40098253a6768cfc3ffbbd5988ba852d364;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [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 Cc: Eric Van Hensbergen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 5c6bdf82146..2f580a197b8 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -300,7 +300,7 @@ clunk_fid: fid = V9FS_NOFID; put_fid: - if (fid >= 0) + if (fid != V9FS_NOFID) v9fs_put_idpool(fid, &v9ses->fidpool); kfree(fcall);