aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2009-11-06 14:18:49 -0500
committerSteve French <sfrench@us.ibm.com>2009-11-06 17:06:14 -0500
commitf475f6775465283494346663f201ad04810d2e8a (patch)
treeb5c054afa5509ee6957fb6a93d09999b9db975ab /fs
parentec06aedd44541129840ed52e6165afa3796a27bf (diff)
cifs: don't use CIFSGetSrvInodeNumber in is_path_accessible
Because it's lighter weight, CIFS tries to use CIFSGetSrvInodeNumber to verify the accessibility of the root inode and then falls back to doing a full QPathInfo if that fails with -EOPNOTSUPP. I have at least a report of a server that returns NT_STATUS_INTERNAL_ERROR rather than something that translates to EOPNOTSUPP. Rather than trying to be clever with that call, just have is_path_accessible do a normal QPathInfo. That call is widely supported and it shouldn't increase the overhead significantly. Cc: Stable <stable@kernel.org> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/connect.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index b09098079916..63ea83ff687f 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2220,16 +2220,8 @@ is_path_accessible(int xid, struct cifsTconInfo *tcon,
2220 struct cifs_sb_info *cifs_sb, const char *full_path) 2220 struct cifs_sb_info *cifs_sb, const char *full_path)
2221{ 2221{
2222 int rc; 2222 int rc;
2223 __u64 inode_num;
2224 FILE_ALL_INFO *pfile_info; 2223 FILE_ALL_INFO *pfile_info;
2225 2224
2226 rc = CIFSGetSrvInodeNumber(xid, tcon, full_path, &inode_num,
2227 cifs_sb->local_nls,
2228 cifs_sb->mnt_cifs_flags &
2229 CIFS_MOUNT_MAP_SPECIAL_CHR);
2230 if (rc != -EOPNOTSUPP)
2231 return rc;
2232
2233 pfile_info = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); 2225 pfile_info = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL);
2234 if (pfile_info == NULL) 2226 if (pfile_info == NULL)
2235 return -ENOMEM; 2227 return -ENOMEM;