summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2018-07-31 02:21:37 -0400
committerSteve French <stfrench@microsoft.com>2018-08-07 15:20:22 -0400
commitfcabb89299d79010eb923afdd26de04afcc0527f (patch)
tree1421d066bffdd441311bff89551640a5a1f0c91e /fs/cifs/cifsglob.h
parent9da6ec7775d2cd76df53fbf4f1f35f6d490204f5 (diff)
cifs: simple stats should always be enabled
CONFIG_CIFS_STATS should always be enabled as Pavel recently noted. Simple statistics are not a significant performance hit, and removing the ifdef simplifies the code slightly. Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 0e6fd5fa4eb6..4a3a737134ea 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -931,7 +931,6 @@ struct cifs_tcon {
931 __u32 tid; /* The 4 byte tree id */ 931 __u32 tid; /* The 4 byte tree id */
932 __u16 Flags; /* optional support bits */ 932 __u16 Flags; /* optional support bits */
933 enum statusEnum tidStatus; 933 enum statusEnum tidStatus;
934#ifdef CONFIG_CIFS_STATS
935 atomic_t num_smbs_sent; 934 atomic_t num_smbs_sent;
936 union { 935 union {
937 struct { 936 struct {
@@ -965,7 +964,6 @@ struct cifs_tcon {
965 __u64 bytes_read; 964 __u64 bytes_read;
966 __u64 bytes_written; 965 __u64 bytes_written;
967 spinlock_t stat_lock; /* protects the two fields above */ 966 spinlock_t stat_lock; /* protects the two fields above */
968#endif /* CONFIG_CIFS_STATS */
969 FILE_SYSTEM_DEVICE_INFO fsDevInfo; 967 FILE_SYSTEM_DEVICE_INFO fsDevInfo;
970 FILE_SYSTEM_ATTRIBUTE_INFO fsAttrInfo; /* ok if fs name truncated */ 968 FILE_SYSTEM_ATTRIBUTE_INFO fsAttrInfo; /* ok if fs name truncated */
971 FILE_SYSTEM_UNIX_INFO fsUnixInfo; 969 FILE_SYSTEM_UNIX_INFO fsUnixInfo;
@@ -1331,7 +1329,6 @@ convert_delimiter(char *path, char delim)
1331 *pos = delim; 1329 *pos = delim;
1332} 1330}
1333 1331
1334#ifdef CONFIG_CIFS_STATS
1335#define cifs_stats_inc atomic_inc 1332#define cifs_stats_inc atomic_inc
1336 1333
1337static inline void cifs_stats_bytes_written(struct cifs_tcon *tcon, 1334static inline void cifs_stats_bytes_written(struct cifs_tcon *tcon,
@@ -1351,13 +1348,6 @@ static inline void cifs_stats_bytes_read(struct cifs_tcon *tcon,
1351 tcon->bytes_read += bytes; 1348 tcon->bytes_read += bytes;
1352 spin_unlock(&tcon->stat_lock); 1349 spin_unlock(&tcon->stat_lock);
1353} 1350}
1354#else
1355
1356#define cifs_stats_inc(field) do {} while (0)
1357#define cifs_stats_bytes_written(tcon, bytes) do {} while (0)
1358#define cifs_stats_bytes_read(tcon, bytes) do {} while (0)
1359
1360#endif
1361 1351
1362 1352
1363/* 1353/*