From: Chao Yu <yuchao0@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
<linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [PATCH 1/2] f2fs: add missing quota_initialize in f2fs_set_acl
Date: Wed, 25 Oct 2017 13:57:42 +0800 [thread overview]
Message-ID: <fa22fb69-e026-dbbb-d5ba-19fdfd9d2df3@huawei.com> (raw)
In-Reply-To: <20171025054419.GB83348@jaegeuk-macbookpro.roam.corp.google.com>
On 2017/10/25 13:44, Jaegeuk Kim wrote:
> On 10/24, Chao Yu wrote:
>> On 2017/10/24 6:14, Jaegeuk Kim wrote:
>>> This patch adds to call quota_intialize in f2fs_set_acl.
>>>
>>> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
>>> ---
>>> fs/f2fs/acl.c | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c
>>> index 436b3a1464d9..f6471f9d707e 100644
>>> --- a/fs/f2fs/acl.c
>>> +++ b/fs/f2fs/acl.c
>>> @@ -209,6 +209,10 @@ static int __f2fs_set_acl(struct inode *inode, int type,
>>> int error;
>>> umode_t mode = inode->i_mode;
>>>
>>> + error = dquot_initialize(inode);
>>> + if (error)
>>> + return error;
>>
>> Could you move this to f2fs_setxattr, and also add missing dquot_initialize in
>> unlink and rename like ext4?
>
> I've checked that f2fs_unlink and f2fs_rename are calling dquot_initialize().
ext4_unlink:
retval = dquot_initialize(dir);
if (retval)
return retval;
retval = dquot_initialize(d_inode(dentry));
if (retval)
return retval;
f2fs_unlink:
err = dquot_initialize(dir);
if (err)
return err;
ext4_rename
retval = dquot_initialize(old.dir);
if (retval)
return retval;
retval = dquot_initialize(new.dir);
if (retval)
return retval;
/* Initialize quotas before so that eventual writes go
* in separate transaction */
if (new.inode) {
retval = dquot_initialize(new.inode);
if (retval)
return retval;
}
f2fs_rename
err = dquot_initialize(old_dir);
if (err)
goto out;
err = dquot_initialize(new_dir);
if (err)
goto out;
ext4 call one more dquot_initialize than f2fs, I didn't look into this in
detail, but it's better to check that. :)
Thanks,
>
> Thanks,
>
>>
>> Thanks,
>>
>>> +
>>> switch (type) {
>>> case ACL_TYPE_ACCESS:
>>> name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS;
>>>
>
> .
>
next prev parent reply other threads:[~2017-10-25 5:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-23 22:14 Jaegeuk Kim
2017-10-23 22:14 ` [PATCH 2/2] f2fs: stop all the operations by cp_error flag Jaegeuk Kim
2017-10-24 9:51 ` [f2fs-dev] " Chao Yu
2017-11-05 3:39 ` Chao Yu
2017-11-06 0:49 ` Jaegeuk Kim
2017-10-24 9:46 ` [PATCH 1/2] f2fs: add missing quota_initialize in f2fs_set_acl Chao Yu
2017-10-25 5:44 ` Jaegeuk Kim
2017-10-25 5:57 ` Chao Yu [this message]
2017-10-25 6:30 ` Jaegeuk Kim
2017-10-25 15:47 ` [f2fs-dev] " Chao Yu
2017-10-25 5:43 ` [PATCH 1/2 v2] " Jaegeuk Kim
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=fa22fb69-e026-dbbb-d5ba-19fdfd9d2df3@huawei.com \
--to=yuchao0@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome