Skip to content

Commit 94ea77a

Browse files
Coly Litorvalds
authored andcommitted
fs/cramfs: return f_fsid for statfs(2)
Make cramfs return f_fsid info for statfs(2). Signed-off-by: Coly Li <coly.li@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 8587246 commit 94ea77a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎fs/cramfs/inode.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
318318
static int cramfs_statfs(struct dentry *dentry, struct kstatfs *buf)
319319
{
320320
struct super_block *sb = dentry->d_sb;
321+
u64 id = huge_encode_dev(sb->s_bdev->bd_dev);
321322

322323
buf->f_type = CRAMFS_MAGIC;
323324
buf->f_bsize = PAGE_CACHE_SIZE;
@@ -326,6 +327,8 @@ static int cramfs_statfs(struct dentry *dentry, struct kstatfs *buf)
326327
buf->f_bavail = 0;
327328
buf->f_files = CRAMFS_SB(sb)->files;
328329
buf->f_ffree = 0;
330+
buf->f_fsid.val[0] = (u32)id;
331+
buf->f_fsid.val[1] = (u32)(id >> 32);
329332
buf->f_namelen = CRAMFS_MAXPATHLEN;
330333
return 0;
331334
}

0 commit comments

Comments
 (0)