Re: [PATCH 03/10] VFS: move want_write checks into lookup_hash_update()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 26, 2022 at 12:10:43PM +1000, NeilBrown wrote:
> mnt_want_write() is always called before lookup_hash_update(), so
> we can simplify the code by moving the call into that function.
> 
> If lookup_hash_update() succeeds, it now will have claimed the
> want_write lock.  If it fails, the want_write lock isn't held.
> 
> To allow this, lookup_hash_update() now receives a 'struct path *'
> instead of 'struct dentry *'
> 
> Note that when creating a name, any error from mnt_want_write() does not
> get reported unless there is no other error.  For unlink/rmdir though,
> an error from mnt_want_write() is immediately fatal - overriding ENOENT
> for example.  This behaviour seems strange, but this patch is careful to
> preserve it.

Would be a nice idea, if not for the mess with LOOKUP_SILLY_RENAME later
in the series...



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux