[PATCH 6/9] nfs: eliminate qsilly var from nfs_sillyrename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The sdentry should already have the same info in d_name.

Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
 fs/nfs/unlink.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c
index 42cadd1..b9e8b36 100644
--- a/fs/nfs/unlink.c
+++ b/fs/nfs/unlink.c
@@ -328,7 +328,6 @@ nfs_sillyrename(struct inode *dir, struct dentry *dentry)
 	const int      countersize = sizeof(sillycounter)*2;
 	const int      slen        = sizeof(".nfs")+fileidsize+countersize-1;
 	char           silly[slen+1];
-	struct qstr    qsilly;
 	struct dentry *sdentry;
 	int            error = -EIO;
 
@@ -371,9 +370,8 @@ nfs_sillyrename(struct inode *dir, struct dentry *dentry)
 			goto out;
 	} while(sdentry->d_inode != NULL); /* need negative lookup */
 
-	qsilly.name = silly;
-	qsilly.len  = strlen(silly);
-	error = NFS_PROTO(dir)->rename(dir, &dentry->d_name, dir, &qsilly);
+	error = NFS_PROTO(dir)->rename(dir, &dentry->d_name, dir,
+					&sdentry->d_name);
 	if (dentry->d_inode)
 		nfs_mark_for_revalidate(dentry->d_inode);
 	if (!error) {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux