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 '6.13-rc4-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

- fix caching of files that will be reused for write

- minor cleanup

* tag '6.13-rc4-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: Remove unused is_server_using_iface()
smb: enable reuse of deferred file handles for write operations

+5 -28
-2
fs/smb/client/cifsproto.h
··· 614 614 void cifs_free_hash(struct shash_desc **sdesc); 615 615 616 616 int cifs_try_adding_channels(struct cifs_ses *ses); 617 - bool is_server_using_iface(struct TCP_Server_Info *server, 618 - struct cifs_server_iface *iface); 619 617 bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *iface); 620 618 void cifs_ses_mark_for_reconnect(struct cifs_ses *ses); 621 619
+5 -1
fs/smb/client/file.c
··· 990 990 } 991 991 992 992 /* Get the cached handle as SMB2 close is deferred */ 993 - rc = cifs_get_readable_path(tcon, full_path, &cfile); 993 + if (OPEN_FMODE(file->f_flags) & FMODE_WRITE) { 994 + rc = cifs_get_writable_path(tcon, full_path, FIND_WR_FSUID_ONLY, &cfile); 995 + } else { 996 + rc = cifs_get_readable_path(tcon, full_path, &cfile); 997 + } 994 998 if (rc == 0) { 995 999 if (file->f_flags == cfile->f_flags) { 996 1000 file->private_data = cfile;
-25
fs/smb/client/sess.c
··· 27 27 cifs_ses_add_channel(struct cifs_ses *ses, 28 28 struct cifs_server_iface *iface); 29 29 30 - bool 31 - is_server_using_iface(struct TCP_Server_Info *server, 32 - struct cifs_server_iface *iface) 33 - { 34 - struct sockaddr_in *i4 = (struct sockaddr_in *)&iface->sockaddr; 35 - struct sockaddr_in6 *i6 = (struct sockaddr_in6 *)&iface->sockaddr; 36 - struct sockaddr_in *s4 = (struct sockaddr_in *)&server->dstaddr; 37 - struct sockaddr_in6 *s6 = (struct sockaddr_in6 *)&server->dstaddr; 38 - 39 - if (server->dstaddr.ss_family != iface->sockaddr.ss_family) 40 - return false; 41 - if (server->dstaddr.ss_family == AF_INET) { 42 - if (s4->sin_addr.s_addr != i4->sin_addr.s_addr) 43 - return false; 44 - } else if (server->dstaddr.ss_family == AF_INET6) { 45 - if (memcmp(&s6->sin6_addr, &i6->sin6_addr, 46 - sizeof(i6->sin6_addr)) != 0) 47 - return false; 48 - } else { 49 - /* unknown family.. */ 50 - return false; 51 - } 52 - return true; 53 - } 54 - 55 30 bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *iface) 56 31 { 57 32 int i;