Re: [PATCH 1/2] ksmbd: replace generic_fillattr with vfs_getattr

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

 



On Tue, Feb 20, 2024 at 03:26:00PM +0100, Marios Makassikis wrote:
> Use vfs_getattr instead of generic_fillattr in order to call the
> fs-specific ->getattr if it exists.
> vfs_getattr can return an error, so adapt functions to return the
> error to the caller.
> 
> This fixes incorrectly filled AllocationSize field in SMB responses
> for files on XFS-backed shares.

Nothing XFS-specific here.  Using generic_fillattr outside of a
->getattr implementation is simply wrong and code must use
->getattr to retrieve stat information from outside the file system.

The code changes looks good to me.




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux