Re: [PATCH 3/3] xfs: allocate xattr buffer on demand

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

 



On Thu, Aug 29, 2019 at 08:45:16PM +1000, Dave Chinner wrote:
> > Given that all three callers pass ATTR_ALLOC, do we even need a flag
> 
> Only one caller passes ATTR_ALLOC - the ACL code. The other two
> have their own buffers that are supplied....

Oops, I misread the patch as all three callers changed, but not
actually to pass the flag but just for the different buffer passing.

That being said - xfs_attrmulti_attr_get can trivially use this
scheme.  And for the VFS call it would also make sense, but it
would be a huge change, so maybe some other time.

> Can't overwrite args->valuelen until we've done the ERANGE check.
> Sure, I could put it in a local variable, but that doesn't reduce
> the amount of code, or make it obvious that we intentionally return
> the attribute size when the supplied buffer it too small...

Ok.



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux