diff options
Diffstat (limited to 'fs/cifs/link.c')
-rw-r--r-- | fs/cifs/link.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index 7da755c6550a..6a85ef7b8797 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -55,7 +55,8 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode, | |||
55 | goto cifs_hl_exit; | 55 | goto cifs_hl_exit; |
56 | } | 56 | } |
57 | 57 | ||
58 | if (cifs_sb_target->tcon->ses->capabilities & CAP_UNIX) | 58 | /* if (cifs_sb_target->tcon->ses->capabilities & CAP_UNIX)*/ |
59 | if (pTcon->unix_ext) | ||
59 | rc = CIFSUnixCreateHardLink(xid, pTcon, fromName, toName, | 60 | rc = CIFSUnixCreateHardLink(xid, pTcon, fromName, toName, |
60 | cifs_sb_target->local_nls, | 61 | cifs_sb_target->local_nls, |
61 | cifs_sb_target->mnt_cifs_flags & | 62 | cifs_sb_target->mnt_cifs_flags & |
@@ -129,14 +130,19 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd) | |||
129 | goto out; | 130 | goto out; |
130 | } | 131 | } |
131 | 132 | ||
132 | /* BB add read reparse point symlink code and Unix extensions | 133 | /* We could change this to: |
133 | symlink code here BB */ | 134 | if (pTcon->unix_ext) |
135 | but there does not seem any point in refusing to | ||
136 | get symlink info if we can, even if unix extensions | ||
137 | turned off for this mount */ | ||
138 | |||
134 | if (pTcon->ses->capabilities & CAP_UNIX) | 139 | if (pTcon->ses->capabilities & CAP_UNIX) |
135 | rc = CIFSSMBUnixQuerySymLink(xid, pTcon, full_path, | 140 | rc = CIFSSMBUnixQuerySymLink(xid, pTcon, full_path, |
136 | target_path, | 141 | target_path, |
137 | PATH_MAX-1, | 142 | PATH_MAX-1, |
138 | cifs_sb->local_nls); | 143 | cifs_sb->local_nls); |
139 | else { | 144 | else { |
145 | /* BB add read reparse point symlink code here */ | ||
140 | /* rc = CIFSSMBQueryReparseLinkInfo */ | 146 | /* rc = CIFSSMBQueryReparseLinkInfo */ |
141 | /* BB Add code to Query ReparsePoint info */ | 147 | /* BB Add code to Query ReparsePoint info */ |
142 | /* BB Add MAC style xsymlink check here if enabled */ | 148 | /* BB Add MAC style xsymlink check here if enabled */ |
@@ -186,7 +192,7 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname) | |||
186 | cFYI(1, ("symname is %s", symname)); | 192 | cFYI(1, ("symname is %s", symname)); |
187 | 193 | ||
188 | /* BB what if DFS and this volume is on different share? BB */ | 194 | /* BB what if DFS and this volume is on different share? BB */ |
189 | if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) | 195 | if (pTcon->unix_ext) |
190 | rc = CIFSUnixCreateSymLink(xid, pTcon, full_path, symname, | 196 | rc = CIFSUnixCreateSymLink(xid, pTcon, full_path, symname, |
191 | cifs_sb->local_nls); | 197 | cifs_sb->local_nls); |
192 | /* else | 198 | /* else |
@@ -194,7 +200,7 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname) | |||
194 | cifs_sb_target->local_nls); */ | 200 | cifs_sb_target->local_nls); */ |
195 | 201 | ||
196 | if (rc == 0) { | 202 | if (rc == 0) { |
197 | if (pTcon->ses->capabilities & CAP_UNIX) | 203 | if (pTcon->unix_ext) |
198 | rc = cifs_get_inode_info_unix(&newinode, full_path, | 204 | rc = cifs_get_inode_info_unix(&newinode, full_path, |
199 | inode->i_sb, xid); | 205 | inode->i_sb, xid); |
200 | else | 206 | else |
@@ -266,6 +272,7 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen) | |||
266 | 272 | ||
267 | /* BB add read reparse point symlink code and | 273 | /* BB add read reparse point symlink code and |
268 | Unix extensions symlink code here BB */ | 274 | Unix extensions symlink code here BB */ |
275 | /* We could disable this based on pTcon->unix_ext flag instead ... but why? */ | ||
269 | if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) | 276 | if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) |
270 | rc = CIFSSMBUnixQuerySymLink(xid, pTcon, full_path, | 277 | rc = CIFSSMBUnixQuerySymLink(xid, pTcon, full_path, |
271 | tmpbuffer, | 278 | tmpbuffer, |