Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 290811 Details for
Bug 427472
Backport patch from 2.6.19 allowing fs' to manually d_move() inside of ->rename()
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[PATCH] Allow file systems to manually d_move() inside of ->rename()
a1 (text/plain), 4.35 KB, created by
Sunil Mushran
on 2008-01-04 02:06:35 UTC
(
hide
)
Description:
[PATCH] Allow file systems to manually d_move() inside of ->rename()
Filename:
MIME Type:
Creator:
Sunil Mushran
Created:
2008-01-04 02:06:35 UTC
Size:
4.35 KB
patch
obsolete
>commit 349457ccf2592c14bdf13b6706170ae2e94931b1 >Author: Mark Fasheh <mark.fasheh@oracle.com> >Date: Fri Sep 8 14:22:21 2006 -0700 > > [PATCH] Allow file systems to manually d_move() inside of ->rename() > > Some file systems want to manually d_move() the dentries involved in a > rename. We can do this by making use of the FS_ODD_RENAME flag if we just > have nfs_rename() unconditionally do the d_move(). While there, we rename > the flag to be more descriptive. > > OCFS2 uses this to protect that part of the rename operation with a cluster > lock. > > Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> > Cc: Trond Myklebust <trond.myklebust@fys.uio.no> > Cc: Al Viro <viro@zeniv.linux.org.uk> > Cc: Christoph Hellwig <hch@lst.de> > Signed-off-by: Andrew Morton <akpm@osdl.org> > >diff --git a/fs/namei.c b/fs/namei.c >index 432d6bc..6b591c0 100644 >--- a/fs/namei.c >+++ b/fs/namei.c >@@ -2370,7 +2370,8 @@ static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry, > dput(new_dentry); > } > if (!error) >- d_move(old_dentry,new_dentry); >+ if (!(old_dir->i_sb->s_type->fs_flags & FS_RENAME_DOES_D_MOVE)) >+ d_move(old_dentry,new_dentry); > return error; > } > >@@ -2393,8 +2394,7 @@ static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry, > else > error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry); > if (!error) { >- /* The following d_move() should become unconditional */ >- if (!(old_dir->i_sb->s_type->fs_flags & FS_ODD_RENAME)) >+ if (!(old_dir->i_sb->s_type->fs_flags & FS_RENAME_DOES_D_MOVE)) > d_move(old_dentry, new_dentry); > } > if (target) >diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c >index 3419c2d..7432f1a 100644 >--- a/fs/nfs/dir.c >+++ b/fs/nfs/dir.c >@@ -1669,8 +1669,7 @@ out: > if (rehash) > d_rehash(rehash); > if (!error) { >- if (!S_ISDIR(old_inode->i_mode)) >- d_move(old_dentry, new_dentry); >+ d_move(old_dentry, new_dentry); > nfs_renew_times(new_dentry); > nfs_set_verifier(new_dentry, nfs_save_change_attribute(new_dir)); > } >diff --git a/fs/nfs/super.c b/fs/nfs/super.c >index b99113b..e8d4003 100644 >--- a/fs/nfs/super.c >+++ b/fs/nfs/super.c >@@ -71,7 +71,7 @@ static struct file_system_type nfs_fs_type = { > .name = "nfs", > .get_sb = nfs_get_sb, > .kill_sb = nfs_kill_super, >- .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, >+ .fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, > }; > > struct file_system_type nfs_xdev_fs_type = { >@@ -79,7 +79,7 @@ struct file_system_type nfs_xdev_fs_type = { > .name = "nfs", > .get_sb = nfs_xdev_get_sb, > .kill_sb = nfs_kill_super, >- .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, >+ .fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, > }; > > static struct super_operations nfs_sops = { >@@ -107,7 +107,7 @@ static struct file_system_type nfs4_fs_type = { > .name = "nfs4", > .get_sb = nfs4_get_sb, > .kill_sb = nfs4_kill_super, >- .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, >+ .fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, > }; > > struct file_system_type nfs4_xdev_fs_type = { >@@ -115,7 +115,7 @@ struct file_system_type nfs4_xdev_fs_type = { > .name = "nfs4", > .get_sb = nfs4_xdev_get_sb, > .kill_sb = nfs4_kill_super, >- .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, >+ .fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, > }; > > struct file_system_type nfs4_referral_fs_type = { >@@ -123,7 +123,7 @@ struct file_system_type nfs4_referral_fs_type = { > .name = "nfs4", > .get_sb = nfs4_referral_get_sb, > .kill_sb = nfs4_kill_super, >- .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, >+ .fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, > }; > > static struct super_operations nfs4_sops = { >diff --git a/include/linux/fs.h b/include/linux/fs.h >index 555bc19..1d3e601 100644 >--- a/include/linux/fs.h >+++ b/include/linux/fs.h >@@ -92,9 +92,10 @@ extern int dir_notify_enable; > #define FS_REQUIRES_DEV 1 > #define FS_BINARY_MOUNTDATA 2 > #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ >-#define FS_ODD_RENAME 32768 /* Temporary stuff; will go away as soon >- * as nfs_rename() will be cleaned up >- */ >+#define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() >+ * during rename() internally. >+ */ >+ > /* > * These are the fs-independent mount-flags: up to 32 flags are supported > */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 427472
: 290811 |
292196