Re: [PATCH V3] fs/ntfs3: check if the inode is bad before creating symlink
From: Al Viro
Date: Wed Nov 20 2024 - 22:55:57 EST
On Thu, Nov 21, 2024 at 11:13:29AM +0800, Lizhi Xu wrote:
> user_path_at()->
> filename_lookup()->
> path_lookupat()->
> lookup_last()->
> walk_component()->
> __lookup_slow()->
> ntfs_lookup()->
> d_splice_alias()->
>
> 2. The subsequent chmod fails, causing the inode to be set to bad.
What's wrong with "return an error"?
> 3. During the link operation, d_instantiate() is executed in ntfs_link() to associate the bad inode with the dentry.
Yecchhh... If nothing else, check for is_bad_inode() should be there
for as long as make_bad_inode() is done on live inodes.