|
|
@@ -661,6 +661,12 @@ int f2fs_read_inline_dir(struct file *file, struct dir_context *ctx,
|
|
|
if (IS_ERR(ipage))
|
|
|
return PTR_ERR(ipage);
|
|
|
|
|
|
+ /*
|
|
|
+ * f2fs_readdir was protected by inode.i_rwsem, it is safe to access
|
|
|
+ * ipage without page's lock held.
|
|
|
+ */
|
|
|
+ unlock_page(ipage);
|
|
|
+
|
|
|
inline_dentry = inline_data_addr(inode, ipage);
|
|
|
|
|
|
make_dentry_ptr_inline(inode, &d, inline_dentry);
|
|
|
@@ -669,7 +675,7 @@ int f2fs_read_inline_dir(struct file *file, struct dir_context *ctx,
|
|
|
if (!err)
|
|
|
ctx->pos = d.max;
|
|
|
|
|
|
- f2fs_put_page(ipage, 1);
|
|
|
+ f2fs_put_page(ipage, 0);
|
|
|
return err < 0 ? err : 0;
|
|
|
}
|
|
|
|