diff --git a/fs/hmdfs/hmdfs.h b/fs/hmdfs/hmdfs.h index 61da068bb903647cb7d9cbe24f0cea2c7278dfba..5d1eec787c5106fb900d2ee43070a5faa9668f84 100644 --- a/fs/hmdfs/hmdfs.h +++ b/fs/hmdfs/hmdfs.h @@ -43,7 +43,7 @@ // 20 digits +'\0', Converted from a u64 integer #define HMDFS_ACCOUNT_HASH_MAX_LEN 21 -#define CTRL_PATH_MAX_LEN 21 +#define CTRL_PATH_MAX_LEN 11 #define HMDFS_SUPER_MAGIC 0x20200302 diff --git a/fs/hmdfs/main.c b/fs/hmdfs/main.c index f08ed9fd9fb1c6aabb96ebbc630a186c633da396..7e095299017cc73e92c71f712906e23fd7e74cff 100644 --- a/fs/hmdfs/main.c +++ b/fs/hmdfs/main.c @@ -865,7 +865,6 @@ static int hmdfs_fill_super(struct super_block *sb, void *data, int silent) struct super_block *lower_sb; struct dentry *root_dentry; char ctrl_path[CTRL_PATH_MAX_LEN]; - uint64_t ctrl_hash; if (!raw_data) return -EINVAL; @@ -902,9 +901,8 @@ static int hmdfs_fill_super(struct super_block *sb, void *data, int silent) goto out_freesbi; // add ctrl sysfs node - ctrl_hash = path_hash(sbi->local_dst, strlen(sbi->local_dst), true); - scnprintf(ctrl_path, CTRL_PATH_MAX_LEN, "%llu", ctrl_hash); - hmdfs_debug("hash %llu", ctrl_hash); + scnprintf(ctrl_path, CTRL_PATH_MAX_LEN, "%u", sb->s_dev); + hmdfs_debug("s_dev %u", sb->s_dev); err = hmdfs_register_sysfs(ctrl_path, sbi); if (err) goto out_freesbi;