diff options
| author | Frank Sorenson <sorenson@redhat.com> | 2026-07-31 12:12:30 -0500 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-08-19 12:30:45 -0300 |
| commit | 297d8026a570f2d5552d34e2aa143408da1d57c9 (patch) | |
| tree | 82aa393d24c96d880a551f1f987eb3730e1e4453 /include/linux/debugobjects.h | |
| parent | 32a7af68df7361fe7cf153cf36124d04b94aec00 (diff) | |
cifs: remove redundant size-update block in cifs_remap_file_range()
cifs_remap_file_range() acquires i_rwsem on both inodes via
lock_two_nondirectories() before calling smb2_duplicate_extents().
cifs_setsize() (called inside smb2_duplicate_extents() when the clone
extends the file) therefore already runs under the lock, meaning the
fscache_resize_cookie() added to cifs_setsize() by commit fa724e235cfd
("cifs: add fscache_resize_cookie() to cifs_setsize()") is correctly
serialised for this path without further changes.
That same commit made the caller-side block:
if (rc == 0 && new_size > i_size) {
truncate_setsize(target_inode, new_size);
fscache_resize_cookie(cifs_inode_cookie(target_inode), new_size);
}
redundant: smb2_duplicate_extents() already performs the full size update
via cifs_setsize() when the operation extends the file. Remove the
now-dead block.
Signed-off-by: Frank Sorenson <sorenson@redhat.com>
Reviewed-by: Huiwen He <hehuiwen@kylinos.cn>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
