Skip to content

Commit

Permalink
lustre: don't need to lock inode in directory lseek
Browse files Browse the repository at this point in the history
Note that lustre has its private mutex protecting directory pagecache;
if they ever remove it, they'll need to be careful with PageChecked()
use.

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed May 9, 2016
1 parent 8cb0d2c commit 060ff68
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/lustre/lustre/llite/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,6 @@ static loff_t ll_dir_seek(struct file *file, loff_t offset, int origin)
int api32 = ll_need_32bit_api(sbi);
loff_t ret = -EINVAL;

inode_lock(inode);
switch (origin) {
case SEEK_SET:
break;
Expand Down Expand Up @@ -1903,7 +1902,6 @@ static loff_t ll_dir_seek(struct file *file, loff_t offset, int origin)
goto out;

out:
inode_unlock(inode);
return ret;
}

Expand All @@ -1922,7 +1920,7 @@ const struct file_operations ll_dir_operations = {
.open = ll_dir_open,
.release = ll_dir_release,
.read = generic_read_dir,
.iterate = ll_readdir,
.iterate_shared = ll_readdir,
.unlocked_ioctl = ll_dir_ioctl,
.fsync = ll_fsync,
};

0 comments on commit 060ff68

Please sign in to comment.