Skip to contentSkip to conversation

fs/inode.c: spelling in inode_owner_or_capable doc

PATCH Superseded Aurelien Aptel 2 participants 3 messages Apr 21, 2017 VFS

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/inode.c: spelling in inode_owner_or_capable doc

---
 fs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/inode.c +1 -1
index 88110fd0b282..6d9a10afb79d 100644
@@ -2014,7 +2014,7 @@ EXPORT_SYMBOL(inode_init_owner);
  * inode_owner_or_capable - check current task permissions to inode
  * @inode: inode being checked
  *
- * Return true if current either has CAP_FOWNER in a namespace with the
+ * Return true if current task has either CAP_FOWNER in a namespace with the
  * inode owner uid mapped, or owns the file.
  */
 bool inode_owner_or_capable(const struct inode *inode)
Signature · 1 line
2.12.0
#1 lore raw
Quoted 4 lines · Aurelien Aptel

*
- * Return true if current either has CAP_FOWNER in a namespace with the
+ * Return true if current task has either CAP_FOWNER in a namespace with the
* inode owner uid mapped, or owns the file.

This is wrong. "if the current task has either FOO or owns the file". It's also unnecessarily complex. Try this:

* Return true if the current task owns the file or has CAP_FOWNER in a
* namespace with the inode owner uid mapped

("either" in this context would imply exclusive-or, which isn't the intended meaning).

#2 lore raw
Quoted 8 lines · Matthew Wilcox

This is wrong. "if the current task has either FOO or owns the file". It's also unnecessarily complex. Try this:

* Return true if the current task owns the file or has CAP_FOWNER in a
* namespace with the inode owner uid mapped

("either" in this context would imply exclusive-or, which isn't the intended meaning).

Sounds good, I'll send an updated patch.

Signature · 4 lines
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)