git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'devel' into for-linus
[pandora-kernel.git]
/
fs
/
nfs
/
dir.c
diff --git
a/fs/nfs/dir.c
b/fs/nfs/dir.c
index
672368f
..
370b190
100644
(file)
--- a/
fs/nfs/dir.c
+++ b/
fs/nfs/dir.c
@@
-899,7
+899,7
@@
static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode)
iput(inode);
}
iput(inode);
}
-struct dentry_operations nfs_dentry_operations = {
+
const
struct dentry_operations nfs_dentry_operations = {
.d_revalidate = nfs_lookup_revalidate,
.d_delete = nfs_dentry_delete,
.d_iput = nfs_dentry_iput,
.d_revalidate = nfs_lookup_revalidate,
.d_delete = nfs_dentry_delete,
.d_iput = nfs_dentry_iput,
@@
-967,7
+967,7
@@
out:
#ifdef CONFIG_NFS_V4
static int nfs_open_revalidate(struct dentry *, struct nameidata *);
#ifdef CONFIG_NFS_V4
static int nfs_open_revalidate(struct dentry *, struct nameidata *);
-struct dentry_operations nfs4_dentry_operations = {
+
const
struct dentry_operations nfs4_dentry_operations = {
.d_revalidate = nfs_open_revalidate,
.d_delete = nfs_dentry_delete,
.d_iput = nfs_dentry_iput,
.d_revalidate = nfs_open_revalidate,
.d_delete = nfs_dentry_delete,
.d_iput = nfs_dentry_iput,
@@
-1624,8
+1624,7
@@
static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
} else if (atomic_read(&new_dentry->d_count) > 1)
/* dentry still busy? */
goto out;
} else if (atomic_read(&new_dentry->d_count) > 1)
/* dentry still busy? */
goto out;
- } else
- nfs_drop_nlink(new_inode);
+ }
go_ahead:
/*
go_ahead:
/*
@@
-1638,10
+1637,8
@@
go_ahead:
}
nfs_inode_return_delegation(old_inode);
}
nfs_inode_return_delegation(old_inode);
- if (new_inode != NULL)
{
+ if (new_inode != NULL)
nfs_inode_return_delegation(new_inode);
nfs_inode_return_delegation(new_inode);
- d_delete(new_dentry);
- }
error = NFS_PROTO(old_dir)->rename(old_dir, &old_dentry->d_name,
new_dir, &new_dentry->d_name);
error = NFS_PROTO(old_dir)->rename(old_dir, &old_dentry->d_name,
new_dir, &new_dentry->d_name);
@@
-1650,6
+1647,8
@@
out:
if (rehash)
d_rehash(rehash);
if (!error) {
if (rehash)
d_rehash(rehash);
if (!error) {
+ if (new_inode != NULL)
+ nfs_drop_nlink(new_inode);
d_move(old_dentry, new_dentry);
nfs_set_verifier(new_dentry,
nfs_save_change_attribute(new_dir));
d_move(old_dentry, new_dentry);
nfs_set_verifier(new_dentry,
nfs_save_change_attribute(new_dir));