lkml.org 
[lkml]   [2015]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs
Hi Chao,

On Mon, Dec 28, 2015 at 06:12:45PM +0800, Chao Yu wrote:
> If filesystem is readonly, don't recover inline dot inode.
>
> Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> ---
> fs/f2fs/namei.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
> index 5cc4128..b4a5836 100644
> --- a/fs/f2fs/namei.c
> +++ b/fs/f2fs/namei.c
> @@ -269,7 +269,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
> if (IS_ERR(inode))
> return ERR_CAST(inode);
>
> - if (f2fs_has_inline_dots(inode)) {
> + if (f2fs_has_inline_dots(inode) && !f2fs_readonly(dir->i_sb)) {

We need to return -EROFS if f2fs is readonly?

Thanks,

> err = __recover_dot_dentries(inode, dir->i_ino);
> if (err)
> goto err_out;
> --
> 2.6.3
>


\
 
 \ /
  Last update: 2015-12-29 00:21    [W:0.042 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site