]> err.no Git - linux-2.6/blobdiff - fs/namei.c
sys_fallocate() implementation on i386, x86_64 and powerpc
[linux-2.6] / fs / namei.c
index 5e2d98d10c5d79220a7daa95be76a8ac0616df93..defaa47c11d4e7a1de0d926bc659fd8a03df2d27 100644 (file)
@@ -1576,7 +1576,7 @@ int may_open(struct nameidata *nd, int acc_mode, int flag)
 
        /* O_NOATIME can only be set by the owner or superuser */
        if (flag & O_NOATIME)
-               if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER))
+               if (!is_owner_or_cap(inode))
                        return -EPERM;
 
        /*