Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
cifs: remove bogus remapping of error in cifs_filldir()
cifs: allow calling cifs_build_path_to_root on incomplete cifs_sb
cifs: fix check of error return from is_path_accessable
cifs: remove Local_System_Name
cifs: fix use of CONFIG_CIFS_ACL
cifs: add attribute cache timeout (actimeo) tunable

+157 -144
+3 -1
fs/cifs/Makefile
··· 6 6 cifs-y := cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o inode.o \ 7 7 link.o misc.o netmisc.o smbdes.o smbencrypt.o transport.o asn1.o \ 8 8 md4.o md5.o cifs_unicode.o nterr.o xattr.o cifsencrypt.o \ 9 - readdir.o ioctl.o sess.o export.o cifsacl.o 9 + readdir.o ioctl.o sess.o export.o 10 + 11 + cifs-$(CONFIG_CIFS_ACL) += cifsacl.o 10 12 11 13 cifs-$(CONFIG_CIFS_UPCALL) += cifs_spnego.o 12 14
+9
fs/cifs/README
··· 337 337 wsize default write size (default 57344) 338 338 maximum wsize currently allowed by CIFS is 57344 (fourteen 339 339 4096 byte pages) 340 + actimeo=n attribute cache timeout in seconds (default 1 second). 341 + After this timeout, the cifs client requests fresh attribute 342 + information from the server. This option allows to tune the 343 + attribute cache timeout to suit the workload needs. Shorter 344 + timeouts mean better the cache coherency, but increased number 345 + of calls to the server. Longer timeouts mean reduced number 346 + of calls to the server at the expense of less stricter cache 347 + coherency checks (i.e. incorrect attribute cache for a short 348 + period of time). 340 349 rw mount the network share read-write (note that the 341 350 server may still consider the share read-only) 342 351 ro mount network share read-only
+1
fs/cifs/cifs_fs_sb.h
··· 48 48 struct nls_table *local_nls; 49 49 unsigned int rsize; 50 50 unsigned int wsize; 51 + unsigned long actimeo; /* attribute cache timeout (jiffies) */ 51 52 atomic_t active; 52 53 uid_t mnt_uid; 53 54 gid_t mnt_gid;
-3
fs/cifs/cifsacl.c
··· 30 30 #include "cifs_debug.h" 31 31 32 32 33 - #ifdef CONFIG_CIFS_EXPERIMENTAL 34 - 35 33 static struct cifs_wksid wksidarr[NUM_WK_SIDS] = { 36 34 {{1, 0, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0} }, "null user"}, 37 35 {{1, 1, {0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0} }, "nobody"}, ··· 772 774 773 775 return rc; 774 776 } 775 - #endif /* CONFIG_CIFS_EXPERIMENTAL */
-4
fs/cifs/cifsacl.h
··· 74 74 char sidname[SIDNAMELENGTH]; 75 75 } __attribute__((packed)); 76 76 77 - #ifdef CONFIG_CIFS_EXPERIMENTAL 78 - 79 77 extern int match_sid(struct cifs_sid *); 80 78 extern int compare_sids(const struct cifs_sid *, const struct cifs_sid *); 81 - 82 - #endif /* CONFIG_CIFS_EXPERIMENTAL */ 83 79 84 80 #endif /* _CIFSACL_H */
+2 -1
fs/cifs/cifsfs.c
··· 463 463 464 464 seq_printf(s, ",rsize=%d", cifs_sb->rsize); 465 465 seq_printf(s, ",wsize=%d", cifs_sb->wsize); 466 + /* convert actimeo and display it in seconds */ 467 + seq_printf(s, ",actimeo=%lu", cifs_sb->actimeo / HZ); 466 468 467 469 return 0; 468 470 } ··· 937 935 GlobalCurrentXid = 0; 938 936 GlobalTotalActiveXid = 0; 939 937 GlobalMaxActiveXid = 0; 940 - memset(Local_System_Name, 0, 15); 941 938 spin_lock_init(&cifs_tcp_ses_lock); 942 939 spin_lock_init(&cifs_file_list_lock); 943 940 spin_lock_init(&GlobalMid_Lock);
+10 -2
fs/cifs/cifsglob.h
··· 45 45 #define CIFS_MIN_RCV_POOL 4 46 46 47 47 /* 48 + * default attribute cache timeout (jiffies) 49 + */ 50 + #define CIFS_DEF_ACTIMEO (1 * HZ) 51 + 52 + /* 53 + * max attribute cache timeout (jiffies) - 2^30 54 + */ 55 + #define CIFS_MAX_ACTIMEO (1 << 30) 56 + 57 + /* 48 58 * MAX_REQ is the maximum number of requests that WE will send 49 59 * on one socket concurrently. It also matches the most common 50 60 * value of max multiplex returned by servers. We may ··· 756 746 GLOBAL_EXTERN unsigned int GlobalMaxActiveXid; /* prot by GlobalMid_Sem */ 757 747 GLOBAL_EXTERN spinlock_t GlobalMid_Lock; /* protects above & list operations */ 758 748 /* on midQ entries */ 759 - GLOBAL_EXTERN char Local_System_Name[15]; 760 - 761 749 /* 762 750 * Global counters, updated atomically 763 751 */
+2 -3
fs/cifs/cifsproto.h
··· 54 54 __func__, curr_xid, (int)rc); \ 55 55 } while (0) 56 56 extern char *build_path_from_dentry(struct dentry *); 57 - extern char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb); 57 + extern char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb, 58 + struct cifsTconInfo *tcon); 58 59 extern char *build_wildcard_path_from_dentry(struct dentry *direntry); 59 60 extern char *cifs_compose_mount_options(const char *sb_mountdata, 60 61 const char *fullpath, const struct dfs_info3_param *ref, ··· 80 79 struct TCP_Server_Info *); 81 80 extern bool is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof); 82 81 extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *, bool); 83 - #ifdef CONFIG_CIFS_EXPERIMENTAL 84 82 extern struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *, bool); 85 - #endif 86 83 extern unsigned int smbCalcSize(struct smb_hdr *ptr); 87 84 extern unsigned int smbCalcSize_LE(struct smb_hdr *ptr); 88 85 extern int decode_negTokenInit(unsigned char *security_blob, int length,
+92 -91
fs/cifs/cifssmb.c
··· 2478 2478 } 2479 2479 2480 2480 #ifdef CONFIG_CIFS_EXPERIMENTAL 2481 - /* Initialize NT TRANSACT SMB into small smb request buffer. 2482 - This assumes that all NT TRANSACTS that we init here have 2483 - total parm and data under about 400 bytes (to fit in small cifs 2484 - buffer size), which is the case so far, it easily fits. NB: 2485 - Setup words themselves and ByteCount 2486 - MaxSetupCount (size of returned setup area) and 2487 - MaxParameterCount (returned parms size) must be set by caller */ 2488 - static int 2489 - smb_init_nttransact(const __u16 sub_command, const int setup_count, 2490 - const int parm_len, struct cifsTconInfo *tcon, 2491 - void **ret_buf) 2492 - { 2493 - int rc; 2494 - __u32 temp_offset; 2495 - struct smb_com_ntransact_req *pSMB; 2496 - 2497 - rc = small_smb_init(SMB_COM_NT_TRANSACT, 19 + setup_count, tcon, 2498 - (void **)&pSMB); 2499 - if (rc) 2500 - return rc; 2501 - *ret_buf = (void *)pSMB; 2502 - pSMB->Reserved = 0; 2503 - pSMB->TotalParameterCount = cpu_to_le32(parm_len); 2504 - pSMB->TotalDataCount = 0; 2505 - pSMB->MaxDataCount = cpu_to_le32((tcon->ses->server->maxBuf - 2506 - MAX_CIFS_HDR_SIZE) & 0xFFFFFF00); 2507 - pSMB->ParameterCount = pSMB->TotalParameterCount; 2508 - pSMB->DataCount = pSMB->TotalDataCount; 2509 - temp_offset = offsetof(struct smb_com_ntransact_req, Parms) + 2510 - (setup_count * 2) - 4 /* for rfc1001 length itself */; 2511 - pSMB->ParameterOffset = cpu_to_le32(temp_offset); 2512 - pSMB->DataOffset = cpu_to_le32(temp_offset + parm_len); 2513 - pSMB->SetupCount = setup_count; /* no need to le convert byte fields */ 2514 - pSMB->SubCommand = cpu_to_le16(sub_command); 2515 - return 0; 2516 - } 2517 - 2518 - static int 2519 - validate_ntransact(char *buf, char **ppparm, char **ppdata, 2520 - __u32 *pparmlen, __u32 *pdatalen) 2521 - { 2522 - char *end_of_smb; 2523 - __u32 data_count, data_offset, parm_count, parm_offset; 2524 - struct smb_com_ntransact_rsp *pSMBr; 2525 - 2526 - *pdatalen = 0; 2527 - *pparmlen = 0; 2528 - 2529 - if (buf == NULL) 2530 - return -EINVAL; 2531 - 2532 - pSMBr = (struct smb_com_ntransact_rsp *)buf; 2533 - 2534 - /* ByteCount was converted from little endian in SendReceive */ 2535 - end_of_smb = 2 /* sizeof byte count */ + pSMBr->ByteCount + 2536 - (char *)&pSMBr->ByteCount; 2537 - 2538 - data_offset = le32_to_cpu(pSMBr->DataOffset); 2539 - data_count = le32_to_cpu(pSMBr->DataCount); 2540 - parm_offset = le32_to_cpu(pSMBr->ParameterOffset); 2541 - parm_count = le32_to_cpu(pSMBr->ParameterCount); 2542 - 2543 - *ppparm = (char *)&pSMBr->hdr.Protocol + parm_offset; 2544 - *ppdata = (char *)&pSMBr->hdr.Protocol + data_offset; 2545 - 2546 - /* should we also check that parm and data areas do not overlap? */ 2547 - if (*ppparm > end_of_smb) { 2548 - cFYI(1, "parms start after end of smb"); 2549 - return -EINVAL; 2550 - } else if (parm_count + *ppparm > end_of_smb) { 2551 - cFYI(1, "parm end after end of smb"); 2552 - return -EINVAL; 2553 - } else if (*ppdata > end_of_smb) { 2554 - cFYI(1, "data starts after end of smb"); 2555 - return -EINVAL; 2556 - } else if (data_count + *ppdata > end_of_smb) { 2557 - cFYI(1, "data %p + count %d (%p) past smb end %p start %p", 2558 - *ppdata, data_count, (data_count + *ppdata), 2559 - end_of_smb, pSMBr); 2560 - return -EINVAL; 2561 - } else if (parm_count + data_count > pSMBr->ByteCount) { 2562 - cFYI(1, "parm count and data count larger than SMB"); 2563 - return -EINVAL; 2564 - } 2565 - *pdatalen = data_count; 2566 - *pparmlen = parm_count; 2567 - return 0; 2568 - } 2569 - 2570 2481 int 2571 2482 CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, 2572 2483 const unsigned char *searchName, ··· 2967 3056 2968 3057 #endif /* CONFIG_POSIX */ 2969 3058 2970 - #ifdef CONFIG_CIFS_EXPERIMENTAL 3059 + #ifdef CONFIG_CIFS_ACL 3060 + /* 3061 + * Initialize NT TRANSACT SMB into small smb request buffer. This assumes that 3062 + * all NT TRANSACTS that we init here have total parm and data under about 400 3063 + * bytes (to fit in small cifs buffer size), which is the case so far, it 3064 + * easily fits. NB: Setup words themselves and ByteCount MaxSetupCount (size of 3065 + * returned setup area) and MaxParameterCount (returned parms size) must be set 3066 + * by caller 3067 + */ 3068 + static int 3069 + smb_init_nttransact(const __u16 sub_command, const int setup_count, 3070 + const int parm_len, struct cifsTconInfo *tcon, 3071 + void **ret_buf) 3072 + { 3073 + int rc; 3074 + __u32 temp_offset; 3075 + struct smb_com_ntransact_req *pSMB; 3076 + 3077 + rc = small_smb_init(SMB_COM_NT_TRANSACT, 19 + setup_count, tcon, 3078 + (void **)&pSMB); 3079 + if (rc) 3080 + return rc; 3081 + *ret_buf = (void *)pSMB; 3082 + pSMB->Reserved = 0; 3083 + pSMB->TotalParameterCount = cpu_to_le32(parm_len); 3084 + pSMB->TotalDataCount = 0; 3085 + pSMB->MaxDataCount = cpu_to_le32((tcon->ses->server->maxBuf - 3086 + MAX_CIFS_HDR_SIZE) & 0xFFFFFF00); 3087 + pSMB->ParameterCount = pSMB->TotalParameterCount; 3088 + pSMB->DataCount = pSMB->TotalDataCount; 3089 + temp_offset = offsetof(struct smb_com_ntransact_req, Parms) + 3090 + (setup_count * 2) - 4 /* for rfc1001 length itself */; 3091 + pSMB->ParameterOffset = cpu_to_le32(temp_offset); 3092 + pSMB->DataOffset = cpu_to_le32(temp_offset + parm_len); 3093 + pSMB->SetupCount = setup_count; /* no need to le convert byte fields */ 3094 + pSMB->SubCommand = cpu_to_le16(sub_command); 3095 + return 0; 3096 + } 3097 + 3098 + static int 3099 + validate_ntransact(char *buf, char **ppparm, char **ppdata, 3100 + __u32 *pparmlen, __u32 *pdatalen) 3101 + { 3102 + char *end_of_smb; 3103 + __u32 data_count, data_offset, parm_count, parm_offset; 3104 + struct smb_com_ntransact_rsp *pSMBr; 3105 + 3106 + *pdatalen = 0; 3107 + *pparmlen = 0; 3108 + 3109 + if (buf == NULL) 3110 + return -EINVAL; 3111 + 3112 + pSMBr = (struct smb_com_ntransact_rsp *)buf; 3113 + 3114 + /* ByteCount was converted from little endian in SendReceive */ 3115 + end_of_smb = 2 /* sizeof byte count */ + pSMBr->ByteCount + 3116 + (char *)&pSMBr->ByteCount; 3117 + 3118 + data_offset = le32_to_cpu(pSMBr->DataOffset); 3119 + data_count = le32_to_cpu(pSMBr->DataCount); 3120 + parm_offset = le32_to_cpu(pSMBr->ParameterOffset); 3121 + parm_count = le32_to_cpu(pSMBr->ParameterCount); 3122 + 3123 + *ppparm = (char *)&pSMBr->hdr.Protocol + parm_offset; 3124 + *ppdata = (char *)&pSMBr->hdr.Protocol + data_offset; 3125 + 3126 + /* should we also check that parm and data areas do not overlap? */ 3127 + if (*ppparm > end_of_smb) { 3128 + cFYI(1, "parms start after end of smb"); 3129 + return -EINVAL; 3130 + } else if (parm_count + *ppparm > end_of_smb) { 3131 + cFYI(1, "parm end after end of smb"); 3132 + return -EINVAL; 3133 + } else if (*ppdata > end_of_smb) { 3134 + cFYI(1, "data starts after end of smb"); 3135 + return -EINVAL; 3136 + } else if (data_count + *ppdata > end_of_smb) { 3137 + cFYI(1, "data %p + count %d (%p) past smb end %p start %p", 3138 + *ppdata, data_count, (data_count + *ppdata), 3139 + end_of_smb, pSMBr); 3140 + return -EINVAL; 3141 + } else if (parm_count + data_count > pSMBr->ByteCount) { 3142 + cFYI(1, "parm count and data count larger than SMB"); 3143 + return -EINVAL; 3144 + } 3145 + *pdatalen = data_count; 3146 + *pparmlen = parm_count; 3147 + return 0; 3148 + } 3149 + 2971 3150 /* Get Security Descriptor (by handle) from remote server for a file or dir */ 2972 3151 int 2973 3152 CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid, ··· 3215 3214 return (rc); 3216 3215 } 3217 3216 3218 - #endif /* CONFIG_CIFS_EXPERIMENTAL */ 3217 + #endif /* CONFIG_CIFS_ACL */ 3219 3218 3220 3219 /* Legacy Query Path Information call for lookup to old servers such 3221 3220 as Win9x/WinME */
+27 -15
fs/cifs/connect.c
··· 105 105 unsigned int wsize; 106 106 bool sockopt_tcp_nodelay:1; 107 107 unsigned short int port; 108 + unsigned long actimeo; /* attribute cache timeout (jiffies) */ 108 109 char *prepath; 109 110 struct sockaddr_storage srcaddr; /* allow binding to a local IP */ 110 111 struct nls_table *local_nls; ··· 807 806 short int override_gid = -1; 808 807 bool uid_specified = false; 809 808 bool gid_specified = false; 809 + char *nodename = utsname()->nodename; 810 810 811 811 separator[0] = ','; 812 812 separator[1] = 0; 813 813 814 - if (Local_System_Name[0] != 0) 815 - memcpy(vol->source_rfc1001_name, Local_System_Name, 15); 816 - else { 817 - char *nodename = utsname()->nodename; 818 - int n = strnlen(nodename, 15); 819 - memset(vol->source_rfc1001_name, 0x20, 15); 820 - for (i = 0; i < n; i++) { 821 - /* does not have to be perfect mapping since field is 822 - informational, only used for servers that do not support 823 - port 445 and it can be overridden at mount time */ 824 - vol->source_rfc1001_name[i] = toupper(nodename[i]); 825 - } 826 - } 814 + /* 815 + * does not have to be perfect mapping since field is 816 + * informational, only used for servers that do not support 817 + * port 445 and it can be overridden at mount time 818 + */ 819 + memset(vol->source_rfc1001_name, 0x20, 15); 820 + for (i = 0; i < strnlen(nodename, 15); i++) 821 + vol->source_rfc1001_name[i] = toupper(nodename[i]); 822 + 827 823 vol->source_rfc1001_name[15] = 0; 828 824 /* null target name indicates to use *SMBSERVR default called name 829 825 if we end up sending RFC1001 session initialize */ ··· 837 839 vol->posix_paths = 1; 838 840 /* default to using server inode numbers where available */ 839 841 vol->server_ino = 1; 842 + 843 + vol->actimeo = CIFS_DEF_ACTIMEO; 840 844 841 845 if (!options) 842 846 return 1; ··· 1213 1213 if ((i == 15) && (value[i] != 0)) 1214 1214 printk(KERN_WARNING "CIFS: server net" 1215 1215 "biosname longer than 15 truncated.\n"); 1216 + } 1217 + } else if (strnicmp(data, "actimeo", 7) == 0) { 1218 + if (value && *value) { 1219 + vol->actimeo = HZ * simple_strtoul(value, 1220 + &value, 0); 1221 + if (vol->actimeo > CIFS_MAX_ACTIMEO) { 1222 + cERROR(1, "CIFS: attribute cache" 1223 + "timeout too large"); 1224 + return 1; 1225 + } 1216 1226 } 1217 1227 } else if (strnicmp(data, "credentials", 4) == 0) { 1218 1228 /* ignore */ ··· 2581 2571 cFYI(1, "file mode: 0x%x dir mode: 0x%x", 2582 2572 cifs_sb->mnt_file_mode, cifs_sb->mnt_dir_mode); 2583 2573 2574 + cifs_sb->actimeo = pvolume_info->actimeo; 2575 + 2584 2576 if (pvolume_info->noperm) 2585 2577 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_PERM; 2586 2578 if (pvolume_info->setuids) ··· 2833 2821 /* check if a whole path (including prepath) is not remote */ 2834 2822 if (!rc && cifs_sb->prepathlen && tcon) { 2835 2823 /* build_path_to_root works only when we have a valid tcon */ 2836 - full_path = cifs_build_path_to_root(cifs_sb); 2824 + full_path = cifs_build_path_to_root(cifs_sb, tcon); 2837 2825 if (full_path == NULL) { 2838 2826 rc = -ENOMEM; 2839 2827 goto mount_fail_check; 2840 2828 } 2841 2829 rc = is_path_accessible(xid, tcon, cifs_sb, full_path); 2842 - if (rc != -EREMOTE) { 2830 + if (rc != 0 && rc != -EREMOTE) { 2843 2831 kfree(full_path); 2844 2832 goto mount_fail_check; 2845 2833 }
-2
fs/cifs/file.c
··· 1108 1108 return total_written; 1109 1109 } 1110 1110 1111 - #ifdef CONFIG_CIFS_EXPERIMENTAL 1112 1111 struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *cifs_inode, 1113 1112 bool fsuid_only) 1114 1113 { ··· 1141 1142 spin_unlock(&cifs_file_list_lock); 1142 1143 return NULL; 1143 1144 } 1144 - #endif 1145 1145 1146 1146 struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode, 1147 1147 bool fsuid_only)
+11 -10
fs/cifs/inode.c
··· 686 686 cFYI(1, "cifs_sfu_type failed: %d", tmprc); 687 687 } 688 688 689 - #ifdef CONFIG_CIFS_EXPERIMENTAL 689 + #ifdef CONFIG_CIFS_ACL 690 690 /* fill in 0777 bits from ACL */ 691 691 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { 692 692 rc = cifs_acl_to_fattr(cifs_sb, &fattr, *pinode, full_path, ··· 697 697 goto cgii_exit; 698 698 } 699 699 } 700 - #endif 700 + #endif /* CONFIG_CIFS_ACL */ 701 701 702 702 /* fill in remaining high mode bits e.g. SUID, VTX */ 703 703 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) ··· 728 728 .lookup = cifs_lookup, 729 729 }; 730 730 731 - char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb) 731 + char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb, 732 + struct cifsTconInfo *tcon) 732 733 { 733 734 int pplen = cifs_sb->prepathlen; 734 735 int dfsplen; 735 736 char *full_path = NULL; 736 - struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); 737 737 738 738 /* if no prefix path, simply set path to the root of share to "" */ 739 739 if (pplen == 0) { ··· 875 875 char *full_path; 876 876 struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); 877 877 878 - full_path = cifs_build_path_to_root(cifs_sb); 878 + full_path = cifs_build_path_to_root(cifs_sb, tcon); 879 879 if (full_path == NULL) 880 880 return ERR_PTR(-ENOMEM); 881 881 ··· 1653 1653 cifs_inode_needs_reval(struct inode *inode) 1654 1654 { 1655 1655 struct cifsInodeInfo *cifs_i = CIFS_I(inode); 1656 + struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 1656 1657 1657 1658 if (cifs_i->clientCanCacheRead) 1658 1659 return false; ··· 1664 1663 if (cifs_i->time == 0) 1665 1664 return true; 1666 1665 1667 - /* FIXME: the actimeo should be tunable */ 1668 - if (time_after_eq(jiffies, cifs_i->time + HZ)) 1666 + if (!time_in_range(jiffies, cifs_i->time, 1667 + cifs_i->time + cifs_sb->actimeo)) 1669 1668 return true; 1670 1669 1671 1670 /* hardlinked files w/ noserverino get "special" treatment */ 1672 - if (!(CIFS_SB(inode->i_sb)->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) && 1671 + if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) && 1673 1672 S_ISREG(inode->i_mode) && inode->i_nlink != 1) 1674 1673 return true; 1675 1674 ··· 2122 2121 2123 2122 if (attrs->ia_valid & ATTR_MODE) { 2124 2123 rc = 0; 2125 - #ifdef CONFIG_CIFS_EXPERIMENTAL 2124 + #ifdef CONFIG_CIFS_ACL 2126 2125 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { 2127 2126 rc = mode_to_cifs_acl(inode, full_path, mode); 2128 2127 if (rc) { ··· 2131 2130 goto cifs_setattr_exit; 2132 2131 } 2133 2132 } else 2134 - #endif 2133 + #endif /* CONFIG_CIFS_ACL */ 2135 2134 if (((mode & S_IWUGO) == 0) && 2136 2135 (cifsInode->cifsAttrs & ATTR_READONLY) == 0) { 2137 2136
-12
fs/cifs/readdir.c
··· 759 759 rc = filldir(direntry, qstring.name, qstring.len, file->f_pos, 760 760 ino, fattr.cf_dtype); 761 761 762 - /* 763 - * we can not return filldir errors to the caller since they are 764 - * "normal" when the stat blocksize is too small - we return remapped 765 - * error instead 766 - * 767 - * FIXME: This looks bogus. filldir returns -EOVERFLOW in the above 768 - * case already. Why should we be clobbering other errors from it? 769 - */ 770 - if (rc) { 771 - cFYI(1, "filldir rc = %d", rc); 772 - rc = -EOVERFLOW; 773 - } 774 762 dput(tmp_dentry); 775 763 return rc; 776 764 }