Commit 407938e79edcadba1b5a17cf928584d8a191a8d7
1 parent
dd7dd556e4
Exists in
master
and in
6 other branches
LOOKUP_CREATE and LOOKUP_RENAME_TARGET can be set only on the last step
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 3 changed files with 6 additions and 12 deletions Side-by-side Diff
fs/cifs/dir.c
| ... | ... | @@ -663,10 +663,8 @@ |
| 663 | 663 | * case sensitive name which is specified by user if this is |
| 664 | 664 | * for creation. |
| 665 | 665 | */ |
| 666 | - if (!(nd->flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))) { | |
| 667 | - if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET)) | |
| 668 | - return 0; | |
| 669 | - } | |
| 666 | + if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET)) | |
| 667 | + return 0; | |
| 670 | 668 | |
| 671 | 669 | if (time_after(jiffies, direntry->d_time + HZ) || !lookupCacheEnabled) |
| 672 | 670 | return 0; |
fs/fat/namei_vfat.c
| ... | ... | @@ -82,10 +82,8 @@ |
| 82 | 82 | * case sensitive name which is specified by user if this is |
| 83 | 83 | * for creation. |
| 84 | 84 | */ |
| 85 | - if (!(nd->flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))) { | |
| 86 | - if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET)) | |
| 87 | - return 0; | |
| 88 | - } | |
| 85 | + if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET)) | |
| 86 | + return 0; | |
| 89 | 87 | |
| 90 | 88 | return vfat_revalidate_shortname(dentry); |
| 91 | 89 | } |
fs/jfs/namei.c
| ... | ... | @@ -1624,10 +1624,8 @@ |
| 1624 | 1624 | * case sensitive name which is specified by user if this is |
| 1625 | 1625 | * for creation. |
| 1626 | 1626 | */ |
| 1627 | - if (!(nd->flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))) { | |
| 1628 | - if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET)) | |
| 1629 | - return 0; | |
| 1630 | - } | |
| 1627 | + if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET)) | |
| 1628 | + return 0; | |
| 1631 | 1629 | return 1; |
| 1632 | 1630 | } |
| 1633 | 1631 |