summaryrefslogtreecommitdiffstats
path: root/fs/cifs/link.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-08-30 11:32:14 -0700
committerSteve French <sfrench@us.ibm.com>2005-08-30 11:32:14 -0700
commit7f57356b70dda014ef269135942426e4a852023e (patch)
treefe17d0aa1882984eb9120389fde048616161f2aa /fs/cifs/link.c
parenta9d02ad49013c8fc527f06ca66417103cdbb08b6 (diff)
downloadlinux-7f57356b70dda014ef269135942426e4a852023e.tar.bz2
[CIFS] Remove cifs_sb argument from *build_path_from_dentry
This argument was added in a recent patch, but is unnecessary, since the superblock is easily obtained from the dentry. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/link.c')
-rw-r--r--fs/cifs/link.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
index b8ec6646456a..b43e071fe110 100644
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -49,8 +49,8 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode,
BB note DFS case in future though (when we may have to check) */
down(&inode->i_sb->s_vfs_rename_sem);
- fromName = build_path_from_dentry(old_file, cifs_sb_target);
- toName = build_path_from_dentry(direntry, cifs_sb_target);
+ fromName = build_path_from_dentry(old_file);
+ toName = build_path_from_dentry(direntry);
up(&inode->i_sb->s_vfs_rename_sem);
if((fromName == NULL) || (toName == NULL)) {
rc = -ENOMEM;
@@ -105,17 +105,16 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd)
xid = GetXid();
- cifs_sb = CIFS_SB(inode->i_sb);
- pTcon = cifs_sb->tcon;
-
down(&direntry->d_sb->s_vfs_rename_sem);
- full_path = build_path_from_dentry(direntry, cifs_sb);
+ full_path = build_path_from_dentry(direntry);
up(&direntry->d_sb->s_vfs_rename_sem);
if (!full_path)
goto out_no_free;
cFYI(1, ("Full path: %s inode = 0x%p", full_path, inode));
+ cifs_sb = CIFS_SB(inode->i_sb);
+ pTcon = cifs_sb->tcon;
target_path = kmalloc(PATH_MAX, GFP_KERNEL);
if (!target_path) {
target_path = ERR_PTR(-ENOMEM);
@@ -168,7 +167,7 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname)
pTcon = cifs_sb->tcon;
down(&inode->i_sb->s_vfs_rename_sem);
- full_path = build_path_from_dentry(direntry, cifs_sb);
+ full_path = build_path_from_dentry(direntry);
up(&inode->i_sb->s_vfs_rename_sem);
if(full_path == NULL) {
@@ -237,7 +236,7 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
/* BB would it be safe against deadlock to grab this sem
even though rename itself grabs the sem and calls lookup? */
/* down(&inode->i_sb->s_vfs_rename_sem);*/
- full_path = build_path_from_dentry(direntry, cifs_sb);
+ full_path = build_path_from_dentry(direntry);
/* up(&inode->i_sb->s_vfs_rename_sem);*/
if(full_path == NULL) {