aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 5e2d98d10c5d..defaa47c11d4 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1576,7 +1576,7 @@ int may_open(struct nameidata *nd, int acc_mode, int flag)
1576 1576
1577 /* O_NOATIME can only be set by the owner or superuser */ 1577 /* O_NOATIME can only be set by the owner or superuser */
1578 if (flag & O_NOATIME) 1578 if (flag & O_NOATIME)
1579 if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER)) 1579 if (!is_owner_or_cap(inode))
1580 return -EPERM; 1580 return -EPERM;
1581 1581
1582 /* 1582 /*