- if(CIFSSMBClose(xid, pTcon, fid)) {
- cFYI(1,("Error closing junction point (open for ioctl)"));
- }
- if(rc == -EIO) {
- /* Query if DFS Junction */
- tmp_path =
- kmalloc(MAX_TREE_SIZE + MAX_PATHCONF + 1,
- GFP_KERNEL);
- if (tmp_path) {
- strncpy(tmp_path, pTcon->treeName, MAX_TREE_SIZE);
- strncat(tmp_path, full_path, MAX_PATHCONF);
- rc = get_dfs_path(xid, pTcon->ses, tmp_path,
- cifs_sb->local_nls,
- &num_referrals, &referrals,
- cifs_sb->mnt_cifs_flags &
- CIFS_MOUNT_MAP_SPECIAL_CHR);
- cFYI(1,("Get DFS for %s rc = %d ",tmp_path, rc));
- if((num_referrals == 0) && (rc == 0))
- rc = -EACCES;
- else {
- cFYI(1,("num referral: %d",num_referrals));
- if(referrals) {
- cFYI(1,("referral string: %s",referrals));
- strncpy(tmpbuffer, referrals, len-1);
- }
- }
- kfree(referrals);
- kfree(tmp_path);
-}
- /* BB add code like else decode referrals then memcpy to
- tmpbuffer and free referrals string array BB */