Annotation of /trunk/kernel26-alx/patches-2.6.23-r1/0113-2.6.23.14-all-fixes.patch
Parent Directory | Revision Log
Revision 658 -
(hide annotations)
(download)
Mon Jun 23 21:39:39 2008 UTC (16 years, 3 months ago) by niro
File size: 731 byte(s)
Mon Jun 23 21:39:39 2008 UTC (16 years, 3 months ago) by niro
File size: 731 byte(s)
2.6.23-alx-r1: new default as we fix the via epia clocksource=tsc quircks -linux-2.6.23.17 -fbcondecor-0.9.4 -squashfs-3.3 -unionfs-2.3.3 -ipw3945-1.2.2 -mptbase-vmware fix
1 | niro | 658 | diff --git a/fs/namei.c b/fs/namei.c |
2 | index a83160a..314afe6 100644 | ||
3 | --- a/fs/namei.c | ||
4 | +++ b/fs/namei.c | ||
5 | @@ -1576,7 +1576,7 @@ int may_open(struct nameidata *nd, int acc_mode, int flag) | ||
6 | if (S_ISLNK(inode->i_mode)) | ||
7 | return -ELOOP; | ||
8 | |||
9 | - if (S_ISDIR(inode->i_mode) && (flag & FMODE_WRITE)) | ||
10 | + if (S_ISDIR(inode->i_mode) && (acc_mode & MAY_WRITE)) | ||
11 | return -EISDIR; | ||
12 | |||
13 | error = vfs_permission(nd, acc_mode); | ||
14 | @@ -1595,7 +1595,7 @@ int may_open(struct nameidata *nd, int acc_mode, int flag) | ||
15 | return -EACCES; | ||
16 | |||
17 | flag &= ~O_TRUNC; | ||
18 | - } else if (IS_RDONLY(inode) && (flag & FMODE_WRITE)) | ||
19 | + } else if (IS_RDONLY(inode) && (acc_mode & MAY_WRITE)) | ||
20 | return -EROFS; | ||
21 | /* | ||
22 | * An append-only file must be opened in append mode for writing. |