mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
staging: erofs: no need to take page lock in readdir
VFS will take inode_lock for readdir, therefore no need to take page lock in readdir at all just as the majority of other generic filesystems. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
615cba3557
commit
b2bb112db1
1 changed files with 0 additions and 2 deletions
|
@ -98,7 +98,6 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx)
|
||||||
if (IS_ERR(dentry_page))
|
if (IS_ERR(dentry_page))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
lock_page(dentry_page);
|
|
||||||
de = (struct erofs_dirent *)kmap(dentry_page);
|
de = (struct erofs_dirent *)kmap(dentry_page);
|
||||||
|
|
||||||
nameoff = le16_to_cpu(de->nameoff);
|
nameoff = le16_to_cpu(de->nameoff);
|
||||||
|
@ -128,7 +127,6 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx)
|
||||||
skip_this:
|
skip_this:
|
||||||
kunmap(dentry_page);
|
kunmap(dentry_page);
|
||||||
|
|
||||||
unlock_page(dentry_page);
|
|
||||||
put_page(dentry_page);
|
put_page(dentry_page);
|
||||||
|
|
||||||
ctx->pos = blknr_to_addr(i) + ofs;
|
ctx->pos = blknr_to_addr(i) + ofs;
|
||||||
|
|
Loading…
Reference in a new issue