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
| ||
|
Message-ID: <792da260-656c-4e05-9d06-90580927bc20@huaweicloud.com> Date: Fri, 6 Dec 2024 16:13:14 +0800 From: Zhang Yi <yi.zhang@...weicloud.com> To: Jan Kara <jack@...e.cz> Cc: linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org, tytso@....edu, adilger.kernel@...ger.ca, ritesh.list@...il.com, hch@...radead.org, djwong@...nel.org, david@...morbit.com, zokeefe@...gle.com, yi.zhang@...wei.com, chengzhihao1@...wei.com, yukuai3@...wei.com, yangerkun@...wei.com Subject: Re: [PATCH 09/27] ext4: move out inode_lock into ext4_fallocate() On 2024/12/4 20:05, Jan Kara wrote: > On Tue 22-10-24 19:10:40, Zhang Yi wrote: >> From: Zhang Yi <yi.zhang@...wei.com> >> >> Currently, all five sub-functions of ext4_fallocate() acquire the >> inode's i_rwsem at the beginning and release it before exiting. This >> process can be simplified by factoring out the management of i_rwsem >> into the ext4_fallocate() function. >> >> Signed-off-by: Zhang Yi <yi.zhang@...wei.com> > > Ah, nice. Feel free to add: > > Reviewed-by: Jan Kara <jack@...e.cz> > > and please ignore my comments about renaming 'out' labels :). > > Honza > ... >> @@ -4774,9 +4765,8 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len) >> >> inode_lock(inode); >> ret = ext4_convert_inline_data(inode); >> - inode_unlock(inode); >> if (ret) >> - return ret; >> + goto out; >> >> if (mode & FALLOC_FL_PUNCH_HOLE) >> ret = ext4_punch_hole(file, offset, len); >> @@ -4788,7 +4778,8 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len) >> ret = ext4_zero_range(file, offset, len, mode); >> else >> ret = ext4_do_fallocate(file, offset, len, mode); >> - >> +out: >> + inode_unlock(inode); >> return ret; >> } >> I guess you may want to suggest rename this out to out_inode_lock as well. Thanks, Yi.
Powered by blists - more mailing lists