Thread (11 messages) 11 messages, 3 authors, 2021-12-21

Re: [PATCH v5 3/5] fs: split off do_getxattr from getxattr

From: Stefan Roesch <hidden>
Date: 2021-12-21 19:15:48
Also in: linux-fsdevel


On 12/21/21 9:22 AM, Linus Torvalds wrote:
On Tue, Dec 21, 2021 at 8:50 AM Stefan Roesch [off-list ref] wrote:
quoted
This splits off do_getxattr function from the getxattr
function. This will allow io_uring to call it from its
io worker.
Hmm.

My reaction to this one is

 "Why isn't do_getxattr() using 'struct xattr_ctx' for its context?"

As far as I can tell, that's *exactly* what it wants, and it would be
logical to match up with the setxattr side.

Yeah, yeah, setxattr has a 'const void __user *value' while getxattr
obviously has just a 'void __user *value'. But if the cost of having a
unified interface is that you lose the 'const' part for the setxattr,
I think that's still a good thing.

Yes? No? Comments?
Linus, if we remove the constness, then we either need to cast away the constness (the system call
is defined as const) or change the definition of the system call.

              Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help