diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2011-09-18 10:20:46 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-09-18 10:20:46 -0400 |
commit | dde820fbf7176b64daddc1856597d9c61dac19e2 (patch) | |
tree | 4a991cc02d9903dd2c4d017686bf4a549478e327 /fs/btrfs | |
parent | 0e7b824c4ef9f5bcf5e48cdce164a7b349dde969 (diff) |
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 <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ioctl.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 1e766e86f334..9947a0ac7bd5 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -2455,7 +2455,6 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, | |||
2455 | if (endoff > inode->i_size) | 2455 | if (endoff > inode->i_size) |
2456 | btrfs_i_size_write(inode, endoff); | 2456 | btrfs_i_size_write(inode, endoff); |
2457 | 2457 | ||
2458 | BTRFS_I(inode)->flags = BTRFS_I(src)->flags; | ||
2459 | ret = btrfs_update_inode(trans, root, inode); | 2458 | ret = btrfs_update_inode(trans, root, inode); |
2460 | BUG_ON(ret); | 2459 | BUG_ON(ret); |
2461 | btrfs_end_transaction(trans, root); | 2460 | btrfs_end_transaction(trans, root); |