Thread (61 messages) 61 messages, 5 authors, 2026-03-17

[PATCH 25/53] smb/client: use d_time to store a timestamp in dentry, not d_fsdata

flat view
STALE196d

From: NeilBrown <hidden>
Date: 2026-03-13 00:46:39
Also in: ceph-devel, gfs2, linux-cifs, linux-efi, linux-ext4, linux-fsdevel, linux-mm, linux-nfs, linux-um, linux-unionfs, linux-xfs, lkml
Subsystem: common internet file system client (cifs and smb3), filesystems (vfs and infrastructure), the rest · Maintainers: Paulo Alcantara, Namjae Jeon, Alexander Viro, Christian Brauner, Linus Torvalds

From: NeilBrown <neil@brown.name>

smb/client uses d_fsdata is exactly the way that d_time is intended to
be used.  It previous used d_time but this was changed in
  Commit: a00be0e31f8d ("cifs: don't use ->d_time")
without any reason being given.

This patch effectively reverts that patch (though it doesn't remove the
helpers) so that d_fsdata can be used for something more generic.

Cc: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: NeilBrown <neil@brown.name>
---
 fs/smb/client/cifsfs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/smb/client/cifsfs.h b/fs/smb/client/cifsfs.h
index e320d39b01f5..5153e811c50b 100644
--- a/fs/smb/client/cifsfs.h
+++ b/fs/smb/client/cifsfs.h
@@ -30,12 +30,12 @@ cifs_uniqueid_to_ino_t(u64 fileid)
 
 static inline void cifs_set_time(struct dentry *dentry, unsigned long time)
 {
-	dentry->d_fsdata = (void *) time;
+	dentry->d_time = time;
 }
 
 static inline unsigned long cifs_get_time(struct dentry *dentry)
 {
-	return (unsigned long) dentry->d_fsdata;
+	return dentry->d_time;
 }
 
 extern struct file_system_type cifs_fs_type, smb3_fs_type;
-- 
2.50.0.107.gf914562f5916.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help