diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2024-03-06 16:20:58 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2024-03-06 16:20:58 +0100 |
commit | cdf6ac2a03d253f05d3e798f60f23dea1b176b92 (patch) | |
tree | 5851952559f7f82741a7a951f2b4de18f6eb6437 /fs/fuse/file.c | |
parent | efc4105a4cf9e300b8e9150147415fa235059293 (diff) |
fuse: get rid of ff->readdir.lock
The same protection is provided by file->f_pos_lock.
Note, this relies on the fact that file->f_mode has FMODE_ATOMIC_POS.
This flag is cleared by stream_open(), which would prevent locking of
f_pos_lock.
Prior to commit 7de64d521bf9 ("fuse: break up fuse_open_common()")
FOPEN_STREAM on a directory would cause stream_open() to be called.
After this commit this is not done anymore, so f_pos_lock will always
be locked.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r-- | fs/fuse/file.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 8b9c5ab0abc0..1b0b9f2a4fbf 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -69,7 +69,6 @@ struct fuse_file *fuse_file_alloc(struct fuse_mount *fm, bool release) } INIT_LIST_HEAD(&ff->write_entry); - mutex_init(&ff->readdir.lock); refcount_set(&ff->count, 1); RB_CLEAR_NODE(&ff->polled_node); init_waitqueue_head(&ff->poll_wait); @@ -82,7 +81,6 @@ struct fuse_file *fuse_file_alloc(struct fuse_mount *fm, bool release) void fuse_file_free(struct fuse_file *ff) { kfree(ff->args); - mutex_destroy(&ff->readdir.lock); kfree(ff); } |