diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2019-12-09 11:10:11 +0000 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-01-20 20:12:41 -0500 |
commit | cdc46e99e1c9f50802c4f543f10151887e4c4e0e (patch) | |
tree | 6e78dc633d831861d3fd4b21100dc9c3126d7d26 /fs/adfs | |
parent | 4a0a88b6660b48f773b6e7631e0be57b7f5048ed (diff) | |
download | linux-cdc46e99e1c9f50802c4f543f10151887e4c4e0e.tar.gz linux-cdc46e99e1c9f50802c4f543f10151887e4c4e0e.tar.bz2 linux-cdc46e99e1c9f50802c4f543f10151887e4c4e0e.zip |
fs/adfs: dir: switch to iterate_shared method
There is nothing in our readdir (aka iterate) method that relies on
the directory inode being exclusively locked, so switch to using the
iterate_shared() hook rather than iterate().
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/adfs')
-rw-r--r-- | fs/adfs/dir.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/adfs/dir.c b/fs/adfs/dir.c index 931eefb2375b..2a8f5f1fd3d0 100644 --- a/fs/adfs/dir.c +++ b/fs/adfs/dir.c @@ -235,8 +235,7 @@ void adfs_object_fixup(struct adfs_dir *dir, struct object_info *obj) } } -static int -adfs_readdir(struct file *file, struct dir_context *ctx) +static int adfs_iterate(struct file *file, struct dir_context *ctx) { struct inode *inode = file_inode(file); struct super_block *sb = inode->i_sb; @@ -399,7 +398,7 @@ unlock: const struct file_operations adfs_dir_operations = { .read = generic_read_dir, .llseek = generic_file_llseek, - .iterate = adfs_readdir, + .iterate_shared = adfs_iterate, .fsync = generic_file_fsync, }; |