OSDN Git Service

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)
commit4a378d8a0d9606e97bddb0389cbc2009c6fc006c
tree8e0e11fb736c3a1911935d5b030918bcebc6a0fa
parent60606ecad1881566ae1c76e2b921b6c07407e2cf
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