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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag '4.20-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:
"Three small fixes: a fix for smb3 direct i/o, a fix for CIFS DFS for
stable and a minor cifs Kconfig fix"

* tag '4.20-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
CIFS: Avoid returning EBUSY to upper layer VFS
cifs: Fix separator when building path from dentry
cifs: In Kconfig CONFIG_CIFS_POSIX needs depends on legacy (insecure cifs)

+8 -27
+1 -1
fs/cifs/Kconfig
··· 133 133 134 134 config CIFS_POSIX 135 135 bool "CIFS POSIX Extensions" 136 - depends on CIFS_XATTR 136 + depends on CIFS && CIFS_ALLOW_INSECURE_LEGACY && CIFS_XATTR 137 137 help 138 138 Enabling this option will cause the cifs client to attempt to 139 139 negotiate a newer dialect with servers, such as Samba 3.0.5
+1 -1
fs/cifs/dir.c
··· 174 174 175 175 cifs_dbg(FYI, "using cifs_sb prepath <%s>\n", cifs_sb->prepath); 176 176 memcpy(full_path+dfsplen+1, cifs_sb->prepath, pplen-1); 177 - full_path[dfsplen] = '\\'; 177 + full_path[dfsplen] = dirsep; 178 178 for (i = 0; i < pplen-1; i++) 179 179 if (full_path[dfsplen+1+i] == '/') 180 180 full_path[dfsplen+1+i] = CIFS_DIR_SEP(cifs_sb);
+6 -25
fs/cifs/file.c
··· 2541 2541 cifs_resend_wdata(struct cifs_writedata *wdata, struct list_head *wdata_list, 2542 2542 struct cifs_aio_ctx *ctx) 2543 2543 { 2544 - int wait_retry = 0; 2545 2544 unsigned int wsize, credits; 2546 2545 int rc; 2547 2546 struct TCP_Server_Info *server = 2548 2547 tlink_tcon(wdata->cfile->tlink)->ses->server; 2549 2548 2550 2549 /* 2551 - * Try to resend this wdata, waiting for credits up to 3 seconds. 2550 + * Wait for credits to resend this wdata. 2552 2551 * Note: we are attempting to resend the whole wdata not in segments 2553 2552 */ 2554 2553 do { ··· 2555 2556 server, wdata->bytes, &wsize, &credits); 2556 2557 2557 2558 if (rc) 2558 - break; 2559 + goto out; 2559 2560 2560 2561 if (wsize < wdata->bytes) { 2561 2562 add_credits_and_wake_if(server, credits, 0); 2562 2563 msleep(1000); 2563 - wait_retry++; 2564 2564 } 2565 - } while (wsize < wdata->bytes && wait_retry < 3); 2566 - 2567 - if (wsize < wdata->bytes) { 2568 - rc = -EBUSY; 2569 - goto out; 2570 - } 2565 + } while (wsize < wdata->bytes); 2571 2566 2572 2567 rc = -EAGAIN; 2573 2568 while (rc == -EAGAIN) { ··· 3227 3234 struct list_head *rdata_list, 3228 3235 struct cifs_aio_ctx *ctx) 3229 3236 { 3230 - int wait_retry = 0; 3231 3237 unsigned int rsize, credits; 3232 3238 int rc; 3233 3239 struct TCP_Server_Info *server = 3234 3240 tlink_tcon(rdata->cfile->tlink)->ses->server; 3235 3241 3236 3242 /* 3237 - * Try to resend this rdata, waiting for credits up to 3 seconds. 3243 + * Wait for credits to resend this rdata. 3238 3244 * Note: we are attempting to resend the whole rdata not in segments 3239 3245 */ 3240 3246 do { ··· 3241 3249 &rsize, &credits); 3242 3250 3243 3251 if (rc) 3244 - break; 3252 + goto out; 3245 3253 3246 3254 if (rsize < rdata->bytes) { 3247 3255 add_credits_and_wake_if(server, credits, 0); 3248 3256 msleep(1000); 3249 - wait_retry++; 3250 3257 } 3251 - } while (rsize < rdata->bytes && wait_retry < 3); 3252 - 3253 - /* 3254 - * If we can't find enough credits to send this rdata 3255 - * release the rdata and return failure, this will pass 3256 - * whatever I/O amount we have finished to VFS. 3257 - */ 3258 - if (rsize < rdata->bytes) { 3259 - rc = -EBUSY; 3260 - goto out; 3261 - } 3258 + } while (rsize < rdata->bytes); 3262 3259 3263 3260 rc = -EAGAIN; 3264 3261 while (rc == -EAGAIN) {