aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/namei.c1
-rw-r--r--include/linux/namei.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 18894fdf048a..9e2a534383d9 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2654,6 +2654,7 @@ asmlinkage long sys_renameat(int olddfd, const char __user *oldname,
2654 2654
2655 oldnd.flags &= ~LOOKUP_PARENT; 2655 oldnd.flags &= ~LOOKUP_PARENT;
2656 newnd.flags &= ~LOOKUP_PARENT; 2656 newnd.flags &= ~LOOKUP_PARENT;
2657 newnd.flags |= LOOKUP_RENAME_TARGET;
2657 2658
2658 trap = lock_rename(new_dir, old_dir); 2659 trap = lock_rename(new_dir, old_dir);
2659 2660
diff --git a/include/linux/namei.h b/include/linux/namei.h
index 6b5627afd2eb..99eb80306dc5 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -54,6 +54,7 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
54#define LOOKUP_OPEN 0x0100 54#define LOOKUP_OPEN 0x0100
55#define LOOKUP_CREATE 0x0200 55#define LOOKUP_CREATE 0x0200
56#define LOOKUP_EXCL 0x0400 56#define LOOKUP_EXCL 0x0400
57#define LOOKUP_RENAME_TARGET 0x0800
57 58
58extern int user_path_at(int, const char __user *, unsigned, struct path *); 59extern int user_path_at(int, const char __user *, unsigned, struct path *);
59 60