Skip to content

Commit

Permalink
coda: avoid flagging NULL inodes
Browse files Browse the repository at this point in the history
Somehow we hit a negative dentry in coda_rename even after checking with
d_really_is_positive.  Maybe something raced and turned the new_dentry
negative while we were fixing up directory link counts.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Jan Harkes <[email protected]>
Cc: Alex Shi <[email protected]>
Cc: Jing Yangyang <[email protected]>
Cc: Xin Tan <[email protected]>
Cc: Xiyu Yang <[email protected]>
Cc: Zeal Robot <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
jaharkes authored and torvalds committed Nov 9, 2021
1 parent b1deb68 commit 76097eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/coda/coda_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ static __inline__ void coda_flag_inode(struct inode *inode, int flag)
{
struct coda_inode_info *cii = ITOC(inode);

if (!inode)
return;

spin_lock(&cii->c_lock);
cii->c_flags |= flag;
spin_unlock(&cii->c_lock);
Expand Down

0 comments on commit 76097eb

Please sign in to comment.