linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] fs/inode.c: spelling in inode_owner_or_capable doc
@ 2017-04-21 11:37 Aurelien Aptel
  2017-04-21 12:21 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Aptel @ 2017-04-21 11:37 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Aurelien Aptel, trivial

CC: trivial@kernel.org
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
---
 fs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/inode.c b/fs/inode.c
index 88110fd0b282..6d9a10afb79d 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -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)
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] fs/inode.c: spelling in inode_owner_or_capable doc
  2017-04-21 11:37 [PATCH 1/1] fs/inode.c: spelling in inode_owner_or_capable doc Aurelien Aptel
@ 2017-04-21 12:21 ` Matthew Wilcox
  2017-04-21 13:36   ` Aurélien Aptel
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2017-04-21 12:21 UTC (permalink / raw)
  To: Aurelien Aptel; +Cc: linux-fsdevel, trivial

On Fri, Apr 21, 2017 at 01:37:58PM +0200, Aurelien Aptel wrote:
>   *
> - * 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).

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] fs/inode.c: spelling in inode_owner_or_capable doc
  2017-04-21 12:21 ` Matthew Wilcox
@ 2017-04-21 13:36   ` Aurélien Aptel
  0 siblings, 0 replies; 3+ messages in thread
From: Aurélien Aptel @ 2017-04-21 13:36 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: linux-fsdevel, trivial

Matthew Wilcox <willy@infradead.org> writes:
> 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.

-- 
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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-21 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-21 11:37 [PATCH 1/1] fs/inode.c: spelling in inode_owner_or_capable doc Aurelien Aptel
2017-04-21 12:21 ` Matthew Wilcox
2017-04-21 13:36   ` Aurélien Aptel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).