diff options
author | Joseph Qi <[email protected]> | 2022-10-17 21:02:26 +0800 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2022-10-20 21:27:22 -0700 |
commit | 759a7c6126eef5635506453e9b9d55a6a3ac2084 (patch) | |
tree | 7fc5a0aaa2a7a884623644b0dcb705f0483e4a79 /scripts/gdb/linux/lists.py | |
parent | 977ef30a7d888eeb52fb6908f99080f33e5309a8 (diff) |
ocfs2: fix BUG when iput after ocfs2_mknod fails
Commit b1529a41f777 "ocfs2: should reclaim the inode if
'__ocfs2_mknod_locked' returns an error" tried to reclaim the claimed
inode if __ocfs2_mknod_locked() fails later. But this introduce a race,
the freed bit may be reused immediately by another thread, which will
update dinode, e.g. i_generation. Then iput this inode will lead to BUG:
inode->i_generation != le32_to_cpu(fe->i_generation)
We could make this inode as bad, but we did want to do operations like
wipe in some cases. Since the claimed inode bit can only affect that an
dinode is missing and will return back after fsck, it seems not a big
problem. So just leave it as is by revert the reclaim logic.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: b1529a41f777 ("ocfs2: should reclaim the inode if '__ocfs2_mknod_locked' returns an error")
Signed-off-by: Joseph Qi <[email protected]>
Reported-by: Yan Wang <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Changwei Ge <[email protected]>
Cc: Gang He <[email protected]>
Cc: Jun Piao <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/lists.py')
0 files changed, 0 insertions, 0 deletions