mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Yunlong Song <yunlong.song@huawei.com>, <jaegeuk@kernel.org>,
	<chao@kernel.org>, <yunlong.song@icloud.com>
Cc: <miaoxie@huawei.com>, <bintian.wang@huawei.com>,
	<shengyong1@huawei.com>, <heyunlei@huawei.com>,
	<linux-f2fs-devel@lists.sourceforge.net>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] f2fs: no need to initialize zero value for GFP_F2FS_ZERO
Date: Thu, 22 Mar 2018 09:11:04 +0800	[thread overview]
Message-ID: <2bd0b193-c2de-503e-0379-cf4abe645bd9@huawei.com> (raw)
In-Reply-To: <1521635131-137071-1-git-send-email-yunlong.song@huawei.com>

On 2018/3/21 20:25, Yunlong Song wrote:
> Since f2fs_inode_info is allocated with flag GFP_F2FS_ZERO, so we do not
> need to initialize zero value for its member any more.
> 
> Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
> ---
>  fs/f2fs/super.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 0c1fe9b..3a7fa03 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -825,9 +825,7 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb)
>  	init_once((void *) fi);
>  
>  	/* Initialize f2fs-specific inode info */
> -	atomic_set(&fi->dirty_pages, 0);

We'd better to keep atomic_set function as it is since how it initialize
.dirty_pages field is completely depend on locking sub module itself.

Thanks,

>  	fi->i_current_depth = 1;
> -	fi->i_advise = 0;
>  	init_rwsem(&fi->i_sem);
>  	INIT_LIST_HEAD(&fi->dirty_list);
>  	INIT_LIST_HEAD(&fi->gdirty_list);
> @@ -839,10 +837,6 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb)
>  	init_rwsem(&fi->i_mmap_sem);
>  	init_rwsem(&fi->i_xattr_sem);
>  
> -#ifdef CONFIG_QUOTA
> -	memset(&fi->i_dquot, 0, sizeof(fi->i_dquot));
> -	fi->i_reserved_quota = 0;
> -#endif
>  	/* Will be used by directory only */
>  	fi->i_dir_level = F2FS_SB(sb)->dir_level;
>  
> 

  reply	other threads:[~2018-03-22  1:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21 12:25 Yunlong Song
2018-03-22  1:11 ` Chao Yu [this message]
2018-03-22  2:08 ` [PATCH v2] " Yunlong Song
2018-03-22  2:23   ` Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2bd0b193-c2de-503e-0379-cf4abe645bd9@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=bintian.wang@huawei.com \
    --cc=chao@kernel.org \
    --cc=heyunlei@huawei.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miaoxie@huawei.com \
    --cc=shengyong1@huawei.com \
    --cc=yunlong.song@huawei.com \
    --cc=yunlong.song@icloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®