From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: viro@zeniv.linux.org.uk
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
hirofumi@mail.parknet.co.jp
Subject: [PATCH 6/6] vfs: add LOOKUP_RENAME_NEW intent
Date: Wed, 15 Oct 2008 22:58:11 +0900 [thread overview]
Message-ID: <a9ddfd693e848f5f6f3626623.ps@mail.parknet.co.jp> (raw)
In-Reply-To: <f29a09483e848f5f6f3526623.ps@mail.parknet.co.jp>
This adds LOOKUP_RENAME_NEW intent for lookup of rename destination.
LOOKUP_RENAME_NEW is going to be used like LOOKUP_CREATE. But since
the destination of rename() can be existing directory entry, so it has a
difference. Although that difference doesn't matter in my usage, this
tells it to user of this intent.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
---
fs/namei.c | 1 +
include/linux/namei.h | 1 +
2 files changed, 2 insertions(+)
diff -puN fs/namei.c~dcache-add-rename-intent fs/namei.c
--- linux-2.6/fs/namei.c~dcache-add-rename-intent 2008-08-26 11:13:32.000000000 +0900
+++ linux-2.6-hirofumi/fs/namei.c 2008-08-26 11:13:32.000000000 +0900
@@ -2660,6 +2660,7 @@ asmlinkage long sys_renameat(int olddfd,
oldnd.flags &= ~LOOKUP_PARENT;
newnd.flags &= ~LOOKUP_PARENT;
+ newnd.flags |= LOOKUP_RENAME_NEW;
trap = lock_rename(new_dir, old_dir);
diff -puN include/linux/namei.h~dcache-add-rename-intent include/linux/namei.h
--- linux-2.6/include/linux/namei.h~dcache-add-rename-intent 2008-08-26 11:13:32.000000000 +0900
+++ linux-2.6-hirofumi/include/linux/namei.h 2008-08-26 11:13:32.000000000 +0900
@@ -53,6 +53,7 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA
*/
#define LOOKUP_OPEN (0x0100)
#define LOOKUP_CREATE (0x0200)
+#define LOOKUP_RENAME_NEW (0x0400)
extern int user_path_at(int, const char __user *, unsigned, struct path *);
_
next prev parent reply other threads:[~2008-10-15 14:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 13:58 [PATCH 1/6] vfs: replace parent == dentry->d_parent by IS_ROOT() OGAWA Hirofumi
2008-10-15 13:58 ` [PATCH 2/6] vfs: add d_ancestor() OGAWA Hirofumi
2008-10-15 13:58 ` [PATCH 3/6] vfs: add __d_instantiate() helper OGAWA Hirofumi
2008-10-15 13:58 ` [PATCH 4/6] vfs: remove unnecessary fsnotify_d_instantiate() OGAWA Hirofumi
2008-10-15 13:58 ` [PATCH 5/6] vfs: remove LOOKUP_PARENT from non LOOKUP_PARENT lookup OGAWA Hirofumi
2008-10-15 13:58 ` OGAWA Hirofumi [this message]
2008-10-15 19:37 ` [PATCH 6/6] vfs: add LOOKUP_RENAME_NEW intent Christoph Hellwig
2008-10-15 20:13 ` OGAWA Hirofumi
2008-10-15 19:44 ` [PATCH 5/6] vfs: remove LOOKUP_PARENT from non LOOKUP_PARENT lookup Christoph Hellwig
2008-10-15 21:43 ` OGAWA Hirofumi
2008-10-15 19:43 ` [PATCH 4/6] vfs: remove unnecessary fsnotify_d_instantiate() Christoph Hellwig
2008-10-15 20:16 ` OGAWA Hirofumi
2008-10-15 20:20 ` Christoph Hellwig
2008-10-15 19:41 ` [PATCH 3/6] vfs: add __d_instantiate() helper Christoph Hellwig
2008-10-15 20:39 ` OGAWA Hirofumi
2008-10-15 20:47 ` Trond Myklebust
2008-10-15 21:31 ` OGAWA Hirofumi
2008-10-15 19:53 ` [PATCH 2/6] vfs: add d_ancestor() Christoph Hellwig
2008-10-15 21:42 ` OGAWA Hirofumi
2008-10-15 19:45 ` [PATCH 1/6] vfs: replace parent == dentry->d_parent by IS_ROOT() Christoph Hellwig
2008-10-15 20:24 ` OGAWA Hirofumi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a9ddfd693e848f5f6f3626623.ps@mail.parknet.co.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®