a fix for smb3 direct i/o, a fix for CIFS DFS for stable and a minor cifs Kconfig fix
-----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAlwMfwoACgkQiiy9cAdy T1FkqAv/Tty/Od1u3r/il26vogLunG9JvmC62upgfpb684isEOnYn0oaT9FElunB C43FXF8Zw73zKv/9IqmLExNGZJ0Jm+5eCjnGX+e05QWN8ais91V2IW+4JMLwCga3 KWBD0V1SBa355cObpvWe1WzrIzm1lwa3aCO/lpENo7Ph+kZXcFVIuOPRRxwLOUU9 dkZCtvs5Pb8LVu2k1/jUXh1hqibUGR3V46txDMH6oomsLNV97xTC9URBCbpeWb3f x4mpUeWP3DnUyK8TTr3W1MWh1jlUHg3/8yDHfCuxuluAgRFQpI8Eru18XE8abnkz loFu9eLVT6iwJAlzmkXFF4cGi8LXqz3x4Z+1DopH2S2DBwedw9Tc1dptwOuUbpfg SO4jMOaNXOUSnN+0pCdEiO1z/Nc0YaNg++5AvGRM0BRohpNk6X2COPocf9HvcFI8 xWajm+nkSsEaQNtXRAj/ku7cLovNgHTJt0KXQyCgxBVol19Gf5davHTe5+pPnsfQ e+jdUek4 =wWgw -----END PGP SIGNATURE----- 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)
This commit is contained in:
commit
bc4caf186f
|
@ -133,7 +133,7 @@ config CIFS_XATTR
|
|||
|
||||
config CIFS_POSIX
|
||||
bool "CIFS POSIX Extensions"
|
||||
depends on CIFS_XATTR
|
||||
depends on CIFS && CIFS_ALLOW_INSECURE_LEGACY && CIFS_XATTR
|
||||
help
|
||||
Enabling this option will cause the cifs client to attempt to
|
||||
negotiate a newer dialect with servers, such as Samba 3.0.5
|
||||
|
|
|
@ -174,7 +174,7 @@ cifs_bp_rename_retry:
|
|||
|
||||
cifs_dbg(FYI, "using cifs_sb prepath <%s>\n", cifs_sb->prepath);
|
||||
memcpy(full_path+dfsplen+1, cifs_sb->prepath, pplen-1);
|
||||
full_path[dfsplen] = '\\';
|
||||
full_path[dfsplen] = dirsep;
|
||||
for (i = 0; i < pplen-1; i++)
|
||||
if (full_path[dfsplen+1+i] == '/')
|
||||
full_path[dfsplen+1+i] = CIFS_DIR_SEP(cifs_sb);
|
||||
|
|
|
@ -2541,14 +2541,13 @@ static int
|
|||
cifs_resend_wdata(struct cifs_writedata *wdata, struct list_head *wdata_list,
|
||||
struct cifs_aio_ctx *ctx)
|
||||
{
|
||||
int wait_retry = 0;
|
||||
unsigned int wsize, credits;
|
||||
int rc;
|
||||
struct TCP_Server_Info *server =
|
||||
tlink_tcon(wdata->cfile->tlink)->ses->server;
|
||||
|
||||
/*
|
||||
* Try to resend this wdata, waiting for credits up to 3 seconds.
|
||||
* Wait for credits to resend this wdata.
|
||||
* Note: we are attempting to resend the whole wdata not in segments
|
||||
*/
|
||||
do {
|
||||
|
@ -2556,19 +2555,13 @@ cifs_resend_wdata(struct cifs_writedata *wdata, struct list_head *wdata_list,
|
|||
server, wdata->bytes, &wsize, &credits);
|
||||
|
||||
if (rc)
|
||||
break;
|
||||
goto out;
|
||||
|
||||
if (wsize < wdata->bytes) {
|
||||
add_credits_and_wake_if(server, credits, 0);
|
||||
msleep(1000);
|
||||
wait_retry++;
|
||||
}
|
||||
} while (wsize < wdata->bytes && wait_retry < 3);
|
||||
|
||||
if (wsize < wdata->bytes) {
|
||||
rc = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
} while (wsize < wdata->bytes);
|
||||
|
||||
rc = -EAGAIN;
|
||||
while (rc == -EAGAIN) {
|
||||
|
@ -3234,14 +3227,13 @@ static int cifs_resend_rdata(struct cifs_readdata *rdata,
|
|||
struct list_head *rdata_list,
|
||||
struct cifs_aio_ctx *ctx)
|
||||
{
|
||||
int wait_retry = 0;
|
||||
unsigned int rsize, credits;
|
||||
int rc;
|
||||
struct TCP_Server_Info *server =
|
||||
tlink_tcon(rdata->cfile->tlink)->ses->server;
|
||||
|
||||
/*
|
||||
* Try to resend this rdata, waiting for credits up to 3 seconds.
|
||||
* Wait for credits to resend this rdata.
|
||||
* Note: we are attempting to resend the whole rdata not in segments
|
||||
*/
|
||||
do {
|
||||
|
@ -3249,24 +3241,13 @@ static int cifs_resend_rdata(struct cifs_readdata *rdata,
|
|||
&rsize, &credits);
|
||||
|
||||
if (rc)
|
||||
break;
|
||||
goto out;
|
||||
|
||||
if (rsize < rdata->bytes) {
|
||||
add_credits_and_wake_if(server, credits, 0);
|
||||
msleep(1000);
|
||||
wait_retry++;
|
||||
}
|
||||
} while (rsize < rdata->bytes && wait_retry < 3);
|
||||
|
||||
/*
|
||||
* If we can't find enough credits to send this rdata
|
||||
* release the rdata and return failure, this will pass
|
||||
* whatever I/O amount we have finished to VFS.
|
||||
*/
|
||||
if (rsize < rdata->bytes) {
|
||||
rc = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
} while (rsize < rdata->bytes);
|
||||
|
||||
rc = -EAGAIN;
|
||||
while (rc == -EAGAIN) {
|
||||
|
|
Loading…
Reference in New Issue