OSDN Git Service

ext4: add mask of ext4 flags to swap
authoryangerkun <yangerkun@huawei.com>
Mon, 11 Feb 2019 05:35:06 +0000 (00:35 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 11 Feb 2019 05:35:06 +0000 (00:35 -0500)
commitabdc644e8cbac2e9b19763680e5a7cf9bab2bee7
tree424a943d54e0881e475a91e18cfc00a575e055f1
parentaa507b5faf38784defe49f5e64605ac3c4425e26
ext4: add mask of ext4 flags to swap

The reason is that while swapping two inode, we swap the flags too.
Some flags such as EXT4_JOURNAL_DATA_FL can really confuse the things
since we're not resetting the address operations structure.  The
simplest way to keep things sane is to restrict the flags that can be
swapped.

Signed-off-by: yangerkun <yangerkun@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
fs/ext4/ext4.h
fs/ext4/ioctl.c