Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75392
b: refs/heads/master
c: 974a9f0
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jan 12, 2008
1 parent 6e6905c commit 4c1602a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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: d0c4c9d4a2e46f052178806c4004d52cd3ae040f
refs/heads/master: 974a9f0b47da74e28f68b9c8645c3786aa5ace1a
4 changes: 2 additions & 2 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,7 @@ int may_open(struct nameidata *nd, int acc_mode, int flag)
if (S_ISLNK(inode->i_mode))
return -ELOOP;

if (S_ISDIR(inode->i_mode) && (flag & FMODE_WRITE))
if (S_ISDIR(inode->i_mode) && (acc_mode & MAY_WRITE))
return -EISDIR;

/*
Expand All @@ -1620,7 +1620,7 @@ int may_open(struct nameidata *nd, int acc_mode, int flag)
return -EACCES;

flag &= ~O_TRUNC;
} else if (IS_RDONLY(inode) && (flag & FMODE_WRITE))
} else if (IS_RDONLY(inode) && (acc_mode & MAY_WRITE))
return -EROFS;

error = vfs_permission(nd, acc_mode);
Expand Down

0 comments on commit 4c1602a

Please sign in to comment.