diff --git a/fs/hmdfs/hmdfs.h b/fs/hmdfs/hmdfs.h index c9940693f3e73e871443e27021bc101829e1dcfc..22d64c162b1076c7f35b5e36cb3907bbdf224762 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 10d37cbac2efaae86291fc00a8021ac61e876afd..db4f58d453911317072659b118493a70d91454e2 100644 --- a/fs/hmdfs/main.c +++ b/fs/hmdfs/main.c @@ -864,7 +864,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; @@ -901,9 +900,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;