]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix check of inode in swap_inode_boot_loader
authoryangerkun <yangerkun@huawei.com>
Mon, 11 Feb 2019 05:02:05 +0000 (00:02 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 11 Feb 2019 05:02:05 +0000 (00:02 -0500)
commit6437f0ea8320c249d006e2ef4873f6b4ac3b904b
tree331c544d8b46a2e6d794d95c52d9a4c787164d7a
parentdf10e730c8f566db472614d3f96fa5a3258de03a
ext4: fix check of inode in swap_inode_boot_loader

Before really do swap between inode and boot inode, something need to
check to avoid invalid or not permitted operation, like does this inode
has inline data. But the condition check should be protected by inode
lock to avoid change while swapping. Also some other condition will not
change between swapping, but there has no problem to do this under inode
lock.

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