9p: fix fid refcount leak in v9fs_vfs_atomic_open_dotl
authorDominique Martinet <asmadeus@codewreck.org>
Sun, 12 Jun 2022 07:00:05 +0000 (16:00 +0900)
committerDominique Martinet <asmadeus@codewreck.org>
Wed, 15 Jun 2022 03:05:21 +0000 (12:05 +0900)
commitbeca774fc51a9ba8abbc869cf0c3d965ff17cd24
treeb5f0ad06ba647e4cae78678eb371972d908b9790
parentb13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3
9p: fix fid refcount leak in v9fs_vfs_atomic_open_dotl

We need to release directory fid if we fail halfway through open

This fixes fid leaking with xfstests generic 531

Link: https://lkml.kernel.org/r/20220612085330.1451496-2-asmadeus@codewreck.org
Fixes: 6636b6dcc3db ("9p: add refcount to p9_fid struct")
Cc: stable@vger.kernel.org
Reported-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Reviewed-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
fs/9p/vfs_inode_dotl.c