2.6.39 Kernel Changes for FileSystem, get_sb removed
From: rohan puri <hidden>
Date: 2011-09-20 13:24:29
On Tue, Sep 20, 2011 at 6:46 PM, kashish bhatia [off-list ref] wrote:
Hi Abhijit, On Tue, Sep 20, 2011 at 5:14 PM, Abhijit Pawar [off-list ref]wrote:quoted
Hi list, It seems that the support for get_sb function is removed from kernel 2.6.39 onwards. My code which is working till 2.6.38 series is failing with new kernels.The function "get_sb()" is still present in security/inode.c in kernel 2.6.39. Only the function pointer of get_sb() has been removed from
The name they have kept is the same in security/inode.c but you can compare the prototype to earlier kernel versions. They will be different. Also its assigned to mount function pointer field of struct file_system_type.
struct file_system_type in /include/linux/fs.h. I tried finding out but there isnt anything mentioned. So if this functionquoted
itself is removed then how kernel is going to find out the superblock and use it? Are we supposed to use the mount function provided? This is what i got from one of the kernel patch email.Yes , you are supposed to use mount function. visit the following link : http://lxr.linux.no/#linux+v2.6.39/security/inode.c#L144<http://lxr.linux.no/#linux+v2.6.39/security/inode.c%23L144> +[mandatory]quoted
+ ->get_sb() is gone. Switch to use of ->mount(). Typically it's just +a matter of switching from calling get_sb_... to mount_... and changing the +function type. If you were doing it manually, just switch from setting ->mnt_root +to some pointer to returning that pointer. On errors return ERR_PTR(...).diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txtIt looks like there are other changes related to Pages are also done. Regards, Abhijit Pawar _______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies-- Regards, Kashish _______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Regards, Rohan Puri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110920/d7db0443/attachment.html