Re: [PATCH 04/41] ocfs2: Drop pointless sync_mapping_buffers() calls

Joseph Qi <[email protected]> Mon, 23 Mar 2026 18:46:12 +0800
Newsgroups gmane.linux.kernel.aio.general,gmane.linux.file-systems,gmane.linux.block,gmane.comp.file-systems.ext4,gmane.linux.kernel.mm
Message-ID <[email protected]>

On 3/20/26 9:40 PM, Jan Kara wrote:
> ocfs2 never calls mark_buffer_dirty_inode() and thus its metadata
> buffers list is always empty. Drop the pointless sync_mapping_buffers()
> calls.
> 
> CC: Joel Becker <[email protected]>
> CC: Joseph Qi <[email protected]>
> CC: [email protected]
> Signed-off-by: Jan Kara <[email protected]>

Looks fine.
Reviewed-by: Joseph Qi <[email protected]>

> ---
>  fs/ocfs2/dlmglue.c | 1 -
>  fs/ocfs2/namei.c   | 3 ---
>  2 files changed, 4 deletions(-)
> 
> diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
> index bd2ddb7d841d..7283bb2c5a31 100644
> --- a/fs/ocfs2/dlmglue.c
> +++ b/fs/ocfs2/dlmglue.c
> @@ -3971,7 +3971,6 @@ static int ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres,
>  		mlog(ML_ERROR, "Could not sync inode %llu for downconvert!",
>  		     (unsigned long long)OCFS2_I(inode)->ip_blkno);
>  	}
> -	sync_mapping_buffers(mapping);
>  	if (blocking == DLM_LOCK_EX) {
>  		truncate_inode_pages(mapping, 0);
>  	} else {
> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
> index 268b79339a51..1277666c77cd 100644
> --- a/fs/ocfs2/namei.c
> +++ b/fs/ocfs2/namei.c
> @@ -1683,9 +1683,6 @@ static int ocfs2_rename(struct mnt_idmap *idmap,
>  	if (rename_lock)
>  		ocfs2_rename_unlock(osb);
>  
> -	if (new_inode)
> -		sync_mapping_buffers(old_inode->i_mapping);
> -
>  	iput(new_inode);
>  
>  	ocfs2_free_dir_lookup_result(&target_lookup_res);


--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to [email protected].  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"[email protected]">[email protected]</a>