lkml.org 
[lkml]   [2020]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] dcache: use of d_time under required configs
Date
struct dentry{}->d_time is used when CONFIG_NFS_FS or
CONFIG_VBOXSF_FS is on.
Limit the d_time only when either of configs CONFIG_NFS_FS or
CONFIG_VBOXSF_FS is enabled
With this change size of "struct dentry" is reduced by 8-bytes
on 64-bit system, while of 32-bit system size remains unchanged
dentry object is vastly used, so this change should be useful
for memory saving

Signed-off-by: Anupam Aggarwal <anupam.al@samsung.com>
Signed-off-by: Vivek Trivedi <t.vivek@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
---
include/linux/dcache.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index a94c551..d90da5e 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -101,7 +101,9 @@ struct dentry {
struct lockref d_lockref; /* per-dentry lock and refcount */
const struct dentry_operations *d_op;
struct super_block *d_sb; /* The root of the dentry tree */
+#if IS_ENABLED(CONFIG_NFS_FS) || IS_ENABLED(CONFIG_VBOXSF_FS)
unsigned long d_time; /* used by d_revalidate */
+#endif
void *d_fsdata; /* fs-specific data */

union {
--
1.9.1
\
 
 \ /
  Last update: 2020-05-29 14:37    [W:0.240 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site