summaryrefslogtreecommitdiff
path: root/fs/kernfs/dir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-04-20 19:59:01 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-09 11:41:13 -0400
commit8cb0d2c1c7dea61e9b976cadedeae228f1180cbd (patch)
tree521e54ca0f02bc377faf911038bb2f61534f0a3e /fs/kernfs/dir.c
parenta01b3007ffb9be0180e744f0d15b130b0a76a29f (diff)
kernfs: no point locking directory around that generic_file_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/kernfs/dir.c')
-rw-r--r--fs/kernfs/dir.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 03b688d19f69..4f61d19cde18 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -1643,22 +1643,9 @@ static int kernfs_fop_readdir(struct file *file, struct dir_context *ctx)
return 0;
}
-static loff_t kernfs_dir_fop_llseek(struct file *file, loff_t offset,
- int whence)
-{
- struct inode *inode = file_inode(file);
- loff_t ret;
-
- inode_lock(inode);
- ret = generic_file_llseek(file, offset, whence);
- inode_unlock(inode);
-
- return ret;
-}
-
const struct file_operations kernfs_dir_fops = {
.read = generic_read_dir,
- .iterate = kernfs_fop_readdir,
+ .iterate_shared = kernfs_fop_readdir,
.release = kernfs_dir_fop_release,
- .llseek = kernfs_dir_fop_llseek,
+ .llseek = generic_file_llseek,
};