Re: [PATCH] ksmbd: use F_SETLK when unlocking a file

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

 



On Tue, Nov 15, 2022 at 10:22:42AM -0500, Jeff Layton wrote:
> Maybe, though the current scheme basically of mirrors the userland API,
> as do the ->lock and ->flock file_operations.

Yes.  But the userland API is pretty horrible and the file_operations
should go along with any locks API change.

> FWIW, the filelocking API is pretty rife with warts. Several other
> things that I wouldn't mind doing, just off the top of my head:
> 
> - move the file locking API into a separate header. No need for it to be
> in fs.h, which is already too bloated.
> 
> - define a new struct for leases, and drop lease-specific fields from
> file_lock
> 
> - remove more separate filp and inode arguments
> 
> - maybe rename locks.c to filelock.c? "locks.c" is too ambiguous

These all sounds pretty reasonable to me.



[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