mirror of
https://github.com/psankar/simplefs.git
synced 2025-07-21 21:14:30 +02:00
Use d_alloc_root() instead of d_make_root() in linux kernel < 3.3
d_alloc_root() is gone in 32991ab305ace7017c62f8eecbe5eb36dc32e13b. Link: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=32991ab305ace7017c62f8eecbe5eb36dc32e13b
This commit is contained in:
parent
18df3131a2
commit
a315571b05
7
simple.c
7
simple.c
@ -714,7 +714,14 @@ int simplefs_fill_super(struct super_block *sb, void *data, int silent)
|
||||
root_inode->i_private =
|
||||
simplefs_get_inode(sb, SIMPLEFS_ROOTDIR_INODE_NUMBER);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)
|
||||
sb->s_root = d_make_root(root_inode);
|
||||
#else
|
||||
sb->s_root = d_alloc_root(root_inode);
|
||||
if (!sb->s_root)
|
||||
iput(root_inode);
|
||||
#endif
|
||||
|
||||
if (!sb->s_root)
|
||||
return -ENOMEM;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user