]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: be careful with inode refresh
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 12 Feb 2021 18:22:38 +0000 (13:22 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 13 Mar 2021 03:15:19 +0000 (22:15 -0500)
commiteef759958f81e49fcb8520cf976487ad256615a9
tree8e0e11fb736c3a1911935d5b030918bcebc6a0fa
parent11d3ff4a9ea13e94180f6c39cec67b1d9e4b89fb
gfs2: be careful with inode refresh

1) gfs2_dinode_in() should *not* touch ->i_rdev on live inodes; even
"zero and immediately reread the same value from dinode" is broken -
have it overlap with ->release() of char device and you can get all
kinds of bogus behaviour.

2) mismatch on inode type on live inodes should be treated as fs
corruption rather than blindly setting ->i_mode.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/gfs2/glops.c