Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Coly Li and committed by
Linus Torvalds
94ea77ac 8587246a

+3
+3
fs/cramfs/inode.c
··· 318 318 static int cramfs_statfs(struct dentry *dentry, struct kstatfs *buf) 319 319 { 320 320 struct super_block *sb = dentry->d_sb; 321 + u64 id = huge_encode_dev(sb->s_bdev->bd_dev); 321 322 322 323 buf->f_type = CRAMFS_MAGIC; 323 324 buf->f_bsize = PAGE_CACHE_SIZE; ··· 327 326 buf->f_bavail = 0; 328 327 buf->f_files = CRAMFS_SB(sb)->files; 329 328 buf->f_ffree = 0; 329 + buf->f_fsid.val[0] = (u32)id; 330 + buf->f_fsid.val[1] = (u32)(id >> 32); 330 331 buf->f_namelen = CRAMFS_MAXPATHLEN; 331 332 return 0; 332 333 }