Skip to content

Commit dde820f

Browse files
Li Zefanchrismason-xx
authored andcommitted
Btrfs: don't change inode flag of the dest clone file
The dst file will have the same inode flags with dst file after file clone, and I think it's unexpected. For example, the dst file will suddenly become immutable after getting some share of data with src file, if the src is immutable. Signed-off-by: Li Zefan <[email protected]> Signed-off-by: Chris Mason <[email protected]>
1 parent 0e7b824 commit dde820f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

fs/btrfs/ioctl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2455,7 +2455,6 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
24552455
if (endoff > inode->i_size)
24562456
btrfs_i_size_write(inode, endoff);
24572457

2458-
BTRFS_I(inode)->flags = BTRFS_I(src)->flags;
24592458
ret = btrfs_update_inode(trans, root, inode);
24602459
BUG_ON(ret);
24612460
btrfs_end_transaction(trans, root);

0 commit comments

Comments
 (0)