Skip to content

Commit cdc46e9

Browse files
Russell KingAl Viro
authored andcommitted
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 <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 4a0a88b commit cdc46e9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

fs/adfs/dir.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ void adfs_object_fixup(struct adfs_dir *dir, struct object_info *obj)
235235
}
236236
}
237237

238-
static int
239-
adfs_readdir(struct file *file, struct dir_context *ctx)
238+
static int adfs_iterate(struct file *file, struct dir_context *ctx)
240239
{
241240
struct inode *inode = file_inode(file);
242241
struct super_block *sb = inode->i_sb;
@@ -399,7 +398,7 @@ static int adfs_dir_lookup_byname(struct inode *inode, const struct qstr *qstr,
399398
const struct file_operations adfs_dir_operations = {
400399
.read = generic_read_dir,
401400
.llseek = generic_file_llseek,
402-
.iterate = adfs_readdir,
401+
.iterate_shared = adfs_iterate,
403402
.fsync = generic_file_fsync,
404403
};
405404

0 commit comments

Comments
 (0)