Skip to content

Commit 8d4a0b5

Browse files
committed
Merge tag '5.15-rc-cifs-part2' of git://git.samba.org/sfrench/cifs-2.6
Pull smbfs updates from Steve French: "cifs/smb3 updates: - DFS reconnect fix - begin creating common headers for server and client - rename the cifs_common directory to smbfs_common to be more consistent ie change use of the name cifs to smb (smb3 or smbfs is more accurate, as the very old cifs dialect has long been superseded by smb3 dialects). In the future we can rename the fs/cifs directory to fs/smbfs. This does not include the set of multichannel fixes nor the two deferred close fixes (they are still being reviewed and tested)" * tag '5.15-rc-cifs-part2' of git://git.samba.org/sfrench/cifs-2.6: cifs: properly invalidate cached root handle when closing it cifs: move SMB FSCTL definitions to common code cifs: rename cifs_common to smbfs_common cifs: update FSCTL definitions
2 parents 78e7095 + 9351590 commit 8d4a0b5

File tree

12 files changed

+37
-21
lines changed

12 files changed

+37
-21
lines changed

fs/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ source "fs/ceph/Kconfig"
367367
source "fs/cifs/Kconfig"
368368
source "fs/ksmbd/Kconfig"
369369

370-
config CIFS_COMMON
370+
config SMBFS_COMMON
371371
tristate
372372
default y if CIFS=y
373373
default m if CIFS=m

fs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ obj-$(CONFIG_LOCKD) += lockd/
9696
obj-$(CONFIG_NLS) += nls/
9797
obj-$(CONFIG_UNICODE) += unicode/
9898
obj-$(CONFIG_SYSV_FS) += sysv/
99-
obj-$(CONFIG_CIFS_COMMON) += cifs_common/
99+
obj-$(CONFIG_SMBFS_COMMON) += smbfs_common/
100100
obj-$(CONFIG_CIFS) += cifs/
101101
obj-$(CONFIG_SMB_SERVER) += ksmbd/
102102
obj-$(CONFIG_HPFS_FS) += hpfs/

fs/cifs/cifsencrypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <linux/random.h>
2323
#include <linux/highmem.h>
2424
#include <linux/fips.h>
25-
#include "../cifs_common/arc4.h"
25+
#include "../smbfs_common/arc4.h"
2626
#include <crypto/aead.h>
2727

2828
int __cifs_calc_signature(struct smb_rqst *rqst,

fs/cifs/cifspdu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include <net/sock.h>
1414
#include <asm/unaligned.h>
15-
#include "smbfsctl.h"
15+
#include "../smbfs_common/smbfsctl.h"
1616

1717
#define CIFS_PROT 0
1818
#define POSIX_PROT (CIFS_PROT+1)

fs/cifs/smb2ops.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -689,13 +689,19 @@ smb2_close_cached_fid(struct kref *ref)
689689
cifs_dbg(FYI, "clear cached root file handle\n");
690690
SMB2_close(0, cfid->tcon, cfid->fid->persistent_fid,
691691
cfid->fid->volatile_fid);
692-
cfid->is_valid = false;
693-
cfid->file_all_info_is_valid = false;
694-
cfid->has_lease = false;
695-
if (cfid->dentry) {
696-
dput(cfid->dentry);
697-
cfid->dentry = NULL;
698-
}
692+
}
693+
694+
/*
695+
* We only check validity above to send SMB2_close,
696+
* but we still need to invalidate these entries
697+
* when this function is called
698+
*/
699+
cfid->is_valid = false;
700+
cfid->file_all_info_is_valid = false;
701+
cfid->has_lease = false;
702+
if (cfid->dentry) {
703+
dput(cfid->dentry);
704+
cfid->dentry = NULL;
699705
}
700706
}
701707

fs/cifs/smbencrypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "cifsglob.h"
2525
#include "cifs_debug.h"
2626
#include "cifsproto.h"
27-
#include "../cifs_common/md4.h"
27+
#include "../smbfs_common/md4.h"
2828

2929
#ifndef false
3030
#define false 0

fs/cifs_common/Makefile renamed to fs/smbfs_common/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# Makefile for Linux filesystem routines that are shared by client and server.
44
#
55

6-
obj-$(CONFIG_CIFS_COMMON) += cifs_arc4.o
7-
obj-$(CONFIG_CIFS_COMMON) += cifs_md4.o
6+
obj-$(CONFIG_SMBFS_COMMON) += cifs_arc4.o
7+
obj-$(CONFIG_SMBFS_COMMON) += cifs_md4.o
File renamed without changes.

fs/cifs_common/cifs_arc4.c renamed to fs/smbfs_common/cifs_arc4.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ void cifs_arc4_crypt(struct arc4_ctx *ctx, u8 *out, const u8 *in, unsigned int l
7474
EXPORT_SYMBOL_GPL(cifs_arc4_crypt);
7575

7676
static int __init
77-
init_cifs_common(void)
77+
init_smbfs_common(void)
7878
{
7979
return 0;
8080
}
8181
static void __init
82-
exit_cifs_common(void)
82+
exit_smbfs_common(void)
8383
{
8484
}
8585

86-
module_init(init_cifs_common)
87-
module_exit(exit_cifs_common)
86+
module_init(init_smbfs_common)
87+
module_exit(exit_smbfs_common)
File renamed without changes.

0 commit comments

Comments
 (0)