diff options
author | Steve French <sfrench@us.ibm.com> | 2005-08-30 14:32:14 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-08-30 14:32:14 -0400 |
commit | 7f57356b70dda014ef269135942426e4a852023e (patch) | |
tree | fe17d0aa1882984eb9120389fde048616161f2aa /fs/cifs/link.c | |
parent | a9d02ad49013c8fc527f06ca66417103cdbb08b6 (diff) |
[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.c | 15 |
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, | |||
49 | BB note DFS case in future though (when we may have to check) */ | 49 | BB note DFS case in future though (when we may have to check) */ |
50 | 50 | ||
51 | down(&inode->i_sb->s_vfs_rename_sem); | 51 | down(&inode->i_sb->s_vfs_rename_sem); |
52 | fromName = build_path_from_dentry(old_file, cifs_sb_target); | 52 | fromName = build_path_from_dentry(old_file); |
53 | toName = build_path_from_dentry(direntry, cifs_sb_target); | 53 | toName = build_path_from_dentry(direntry); |
54 | up(&inode->i_sb->s_vfs_rename_sem); | 54 | up(&inode->i_sb->s_vfs_rename_sem); |
55 | if((fromName == NULL) || (toName == NULL)) { | 55 | if((fromName == NULL) || (toName == NULL)) { |
56 | rc = -ENOMEM; | 56 | rc = -ENOMEM; |
@@ -105,17 +105,16 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd) | |||
105 | 105 | ||
106 | xid = GetXid(); | 106 | xid = GetXid(); |
107 | 107 | ||
108 | cifs_sb = CIFS_SB(inode->i_sb); | ||
109 | pTcon = cifs_sb->tcon; | ||
110 | |||
111 | down(&direntry->d_sb->s_vfs_rename_sem); | 108 | down(&direntry->d_sb->s_vfs_rename_sem); |
112 | full_path = build_path_from_dentry(direntry, cifs_sb); | 109 | full_path = build_path_from_dentry(direntry); |
113 | up(&direntry->d_sb->s_vfs_rename_sem); | 110 | up(&direntry->d_sb->s_vfs_rename_sem); |
114 | 111 | ||
115 | if (!full_path) | 112 | if (!full_path) |
116 | goto out_no_free; | 113 | goto out_no_free; |
117 | 114 | ||
118 | cFYI(1, ("Full path: %s inode = 0x%p", full_path, inode)); | 115 | cFYI(1, ("Full path: %s inode = 0x%p", full_path, inode)); |
116 | cifs_sb = CIFS_SB(inode->i_sb); | ||
117 | pTcon = cifs_sb->tcon; | ||
119 | target_path = kmalloc(PATH_MAX, GFP_KERNEL); | 118 | target_path = kmalloc(PATH_MAX, GFP_KERNEL); |
120 | if (!target_path) { | 119 | if (!target_path) { |
121 | target_path = ERR_PTR(-ENOMEM); | 120 | target_path = ERR_PTR(-ENOMEM); |
@@ -168,7 +167,7 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname) | |||
168 | pTcon = cifs_sb->tcon; | 167 | pTcon = cifs_sb->tcon; |
169 | 168 | ||
170 | down(&inode->i_sb->s_vfs_rename_sem); | 169 | down(&inode->i_sb->s_vfs_rename_sem); |
171 | full_path = build_path_from_dentry(direntry, cifs_sb); | 170 | full_path = build_path_from_dentry(direntry); |
172 | up(&inode->i_sb->s_vfs_rename_sem); | 171 | up(&inode->i_sb->s_vfs_rename_sem); |
173 | 172 | ||
174 | if(full_path == NULL) { | 173 | if(full_path == NULL) { |
@@ -237,7 +236,7 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen) | |||
237 | /* BB would it be safe against deadlock to grab this sem | 236 | /* BB would it be safe against deadlock to grab this sem |
238 | even though rename itself grabs the sem and calls lookup? */ | 237 | even though rename itself grabs the sem and calls lookup? */ |
239 | /* down(&inode->i_sb->s_vfs_rename_sem);*/ | 238 | /* down(&inode->i_sb->s_vfs_rename_sem);*/ |
240 | full_path = build_path_from_dentry(direntry, cifs_sb); | 239 | full_path = build_path_from_dentry(direntry); |
241 | /* up(&inode->i_sb->s_vfs_rename_sem);*/ | 240 | /* up(&inode->i_sb->s_vfs_rename_sem);*/ |
242 | 241 | ||
243 | if(full_path == NULL) { | 242 | if(full_path == NULL) { |