lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 28 Apr 2023 09:03:45 +0800
From:   Chao Yu <chao@...nel.org>
To:     Jaegeuk Kim <jaegeuk@...nel.org>
Cc:     Yangtao Li <frank.li@...o.com>,
        Daeho Jeong <daehojeong@...gle.com>, Qi Han <hanqi@...o.com>,
        linux-f2fs-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] f2fs: do not allow to defragment files have
 FI_COMPRESS_RELEASED

On 2023/4/28 0:21, Jaegeuk Kim wrote:
> On 04/27, Chao Yu wrote:
>> On 2023/4/26 0:47, Yangtao Li wrote:
>>> If a file has FI_COMPRESS_RELEASED, all writes for it should not be
>>> allowed.
>>>
>>> Fixes: 5fdb322ff2c2 ("f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE")
>>> Signed-off-by: Qi Han <hanqi@...o.com>
>>> Signed-off-by: Yangtao Li <frank.li@...o.com>
>>
>> Oh, I just see v2.
>>
>> Reviewed-by: Chao Yu <chao@...nel.org>
> 
> Applied with using goto for code consistency.

It makes sense,

Reviewed-by: Chao Yu <chao@...nel.org>

Thanks,

> 
> +       if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {
> +               err = -EINVAL;
> +               goto unlock_out;
> +       }
> +
>          /* if in-place-update policy is enabled, don't waste time here */
>          set_inode_flag(inode, FI_OPU_WRITE);
>          if (f2fs_should_update_inplace(inode, NULL)) {
> @@ -2712,6 +2717,7 @@ static int f2fs_defragment_range(struct f2fs_sb_info *sbi,
>          clear_inode_flag(inode, FI_SKIP_WRITES);
>   out:
>          clear_inode_flag(inode, FI_OPU_WRITE);
> +unlock_out:
>          inode_unlock(inode);
>          if (!err)
>                  range->len = (u64)total << PAGE_SHIFT;
> 
>>
>> Thanks,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ