OSDN Git Service

f2fs: load inode's flag from disk
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 16 May 2017 20:20:16 +0000 (13:20 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 13 Jul 2017 23:55:51 +0000 (16:55 -0700)
commit34c2b318e3ce93a2d7a96f7545fc7c279e492b2d
treefa8ffbc46c7aa92b3f6aa5de3f125de2a2f6a521
parentcc4611491956055e8a414351e6a180677c46ff08
f2fs: load inode's flag from disk

This patch fixes missing inode flag loaded from disk, reported by Tom.

[tom@localhost ~]$ sudo mount /dev/loop0 /mnt/
[tom@localhost ~]$ sudo chown tom:tom /mnt/
[tom@localhost ~]$ touch /mnt/testfile
[tom@localhost ~]$ sudo chattr +i /mnt/testfile
[tom@localhost ~]$ echo test > /mnt/testfile
bash: /mnt/testfile: Operation not permitted
[tom@localhost ~]$ rm /mnt/testfile
rm: cannot remove '/mnt/testfile': Operation not permitted
[tom@localhost ~]$ sudo umount /mnt/
[tom@localhost ~]$ sudo mount /dev/loop0 /mnt/
[tom@localhost ~]$ lsattr /mnt/testfile
----i-------------- /mnt/testfile
[tom@localhost ~]$ echo test > /mnt/testfile
[tom@localhost ~]$ rm /mnt/testfile
[tom@localhost ~]$ sudo umount /mnt/

Cc: stable@vger.kernel.org
Reported-by: Tom Yan <tom.ty89@outlook.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c
fs/f2fs/inode.c