Re: [PATCH] smb/client: clean up a type issue in cifs_xattr_get()
Dan Carpenter <[email protected]> Fri, 12 Jun 2026 14:27:30 +0300
| Newsgroups | gmane.linux.kernel.janitors,gmane.linux.kernel.cifs,gmane.network.samba.internals,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jun 11, 2026 at 03:33:50PM -0500, Steve French wrote: > Doesn't your patch need a cast in the following code in xattr.c since > it returns a ssize_t and you changed rc to int with your patch? > > 315 if (pTcon->ses->server->ops->query_all_EAs) > 316 rc = > pTcon->ses->server->ops->query_all_EAs(xid, pTcon, > 317 full_path, name, value, size, cifs_sb); > It's not required. The ->query_all_EAs() pointer returns ssize_t but the two functions which implement ->query_all_EAs(), CIFSSMBQAllEAs() and smb2_query_eas() return an rc variable which is an int. I would tend to leave it out, but if you want I can add it if you would prefer. My real motivation for making this change is that we have an "acllen = -ERANGE;" assignment where acllen is a u32. Then we store the -ERANGE in a signed long and Smatch triggers a warning at that point. But then we truncate away the upper 32 bits so it ends being fine. regards, dan carpenter