[PATCH 14/61] smb: remove cifs_uniqueid_to_ino_t()
From: Jeff Layton
Date: Thu Feb 26 2026 - 11:21:23 EST
Now that i_ino is u64, cifs_uniqueid_to_ino_t() is a trivial identity
function. Remove it and use fattr->cf_uniqueid directly at both call
sites.
Also remove the now-unused #include <linux/hash.h>, which was only
needed for the old XOR-folding logic.
Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
fs/smb/client/cifsfs.h | 11 -----------
fs/smb/client/inode.c | 2 +-
fs/smb/client/readdir.c | 2 +-
3 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/fs/smb/client/cifsfs.h b/fs/smb/client/cifsfs.h
index 4a1f18022c711a7ff5b141d08ec6cac8483a6b6a..f71b490b548c0274f314dd0dc76bf570ee3cfd09 100644
--- a/fs/smb/client/cifsfs.h
+++ b/fs/smb/client/cifsfs.h
@@ -9,19 +9,8 @@
#ifndef _CIFSFS_H
#define _CIFSFS_H
-#include <linux/hash.h>
-
#define ROOT_I 2
-/*
- * With i_ino being u64, we can store the full 64-bit uniqueid directly.
- */
-static inline u64
-cifs_uniqueid_to_ino_t(u64 fileid)
-{
- return fileid;
-}
-
static inline void cifs_set_time(struct dentry *dentry, unsigned long time)
{
dentry->d_fsdata = (void *) time;
diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c
index 102e7615b658726551e9b01ba25065d1f0c505ac..a82f4fbf8146572e522080bcd7df41153403978d 100644
--- a/fs/smb/client/inode.c
+++ b/fs/smb/client/inode.c
@@ -1618,7 +1618,7 @@ cifs_iget(struct super_block *sb, struct cifs_fattr *fattr)
cifs_dbg(FYI, "looking for uniqueid=%llu\n", fattr->cf_uniqueid);
/* With u64 i_ino, we can use the full uniqueid */
- hash = cifs_uniqueid_to_ino_t(fattr->cf_uniqueid);
+ hash = fattr->cf_uniqueid;
inode = iget5_locked(sb, hash, cifs_find_inode, cifs_init_inode, fattr);
if (inode) {
diff --git a/fs/smb/client/readdir.c b/fs/smb/client/readdir.c
index 8615a8747b7f0127a781b9b3795535df4c9b73cd..cec74bd2e2302c3baeba8d7e1348ba5114d4b1e4 100644
--- a/fs/smb/client/readdir.c
+++ b/fs/smb/client/readdir.c
@@ -919,7 +919,7 @@ static bool cifs_dir_emit(struct dir_context *ctx,
{
size_t delta_bytes = 0;
bool rc, added = false;
- ino_t ino = cifs_uniqueid_to_ino_t(fattr->cf_uniqueid);
+ ino_t ino = fattr->cf_uniqueid;
rc = dir_emit(ctx, name, namelen, ino, fattr->cf_dtype);
if (!rc)
--
2.53.0