Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70773
b: refs/heads/master
c: c7eb266
h: refs/heads/master
i:
  70771: 7686656
v: v3
  • Loading branch information
Dave Hansen authored and Linus Torvalds committed Oct 17, 2007
1 parent 898b0a9 commit 8f38f4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b41572e929221b0d87f529106cdf12185ee84bca
refs/heads/master: c7eb26678e59f16f4e84f1176d187cd21a27414d
6 changes: 5 additions & 1 deletion trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ int generic_permission(struct inode *inode, int mask,
int permission(struct inode *inode, int mask, struct nameidata *nd)
{
int retval, submask;
struct vfsmount *mnt = NULL;

if (nd)
mnt = nd->mnt;

if (mask & MAY_WRITE) {
umode_t mode = inode->i_mode;
Expand All @@ -251,7 +255,7 @@ int permission(struct inode *inode, int mask, struct nameidata *nd)
* MAY_EXEC on regular files is denied if the fs is mounted
* with the "noexec" flag.
*/
if (nd && nd->mnt && (nd->mnt->mnt_flags & MNT_NOEXEC))
if (mnt && (mnt->mnt_flags & MNT_NOEXEC))
return -EACCES;
}

Expand Down

0 comments on commit 8f38f4d

Please sign in to comment.