diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-12-21 10:28:02 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-12-21 10:28:02 -0800 |
| commit | 70990afa34fbac03ade78e2ad0ccd418acecfc04 (patch) | |
| tree | 3d160f121cdbb6bd7353d0179ee65ebd7761167f /fs/9p/vfs_dir.c | |
| parent | e37b12e4bb21e7c81732370b0a2b34bd196f380b (diff) | |
| parent | cfd1d0f524a87b7d6d14b41a14fa4cbe522cf8cc (diff) | |
| download | linux-next-70990afa34fbac03ade78e2ad0ccd418acecfc04.tar.gz linux-next-70990afa34fbac03ade78e2ad0ccd418acecfc04.zip | |
Merge tag '9p-for-5.11-rc1' of git://github.com/martinetd/linux
Pull 9p update from Dominique Martinet:
- fix long-standing limitation on open-unlink-fop pattern
- add refcount to p9_fid (fixes the above and will allow for more
cleanups and simplifications in the future)
* tag '9p-for-5.11-rc1' of git://github.com/martinetd/linux:
9p: Remove unnecessary IS_ERR() check
9p: Uninitialized variable in v9fs_writeback_fid()
9p: Fix writeback fid incorrectly being attached to dentry
9p: apply review requests for fid refcounting
9p: add refcount to p9_fid struct
fs/9p: search open fids first
fs/9p: track open fids
fs/9p: fix create-unlink-getattr idiom
Diffstat (limited to 'fs/9p/vfs_dir.c')
| -rw-r--r-- | fs/9p/vfs_dir.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index 674d22bf4f6f..b6a5a0be444d 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c @@ -210,8 +210,12 @@ int v9fs_dir_release(struct inode *inode, struct file *filp) fid = filp->private_data; p9_debug(P9_DEBUG_VFS, "inode: %p filp: %p fid: %d\n", inode, filp, fid ? fid->fid : -1); - if (fid) + if (fid) { + spin_lock(&inode->i_lock); + hlist_del(&fid->ilist); + spin_unlock(&inode->i_lock); p9_client_clunk(fid); + } return 0; } |
