Al Viro d251ed271d ubifs: fix sget races
* allocate ubifs_info in ->mount(), fill it enough for sb_test() and
set ->s_fs_info to it in set() callback passed to sget().
* do *not* free it in ->put_super(); do that in ->kill_sb() after we'd
done kill_anon_super().
* don't free it in ubifs_fill_super() either - deactivate_locked_super()
done by caller when ubifs_fill_super() returns an error will take care
of that sucker.
* get rid of kludge with passing ubi to ubifs_fill_super() in ->s_fs_info;
we only need it in alloc_ubifs_info(), so ubifs_fill_super() will need
only ubifs_info.  Which it will find in ->s_fs_info just fine, no need to
reassign anything...

As the result, sb_test() becomes safe to apply to all superblocks that
can be found by sget() (and a kludge with temporary use of ->s_fs_info
to store a pointer to very different structure goes away).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-06-12 17:45:34 -04:00
..
2011-05-23 08:22:20 +03:00
2011-05-23 08:22:20 +03:00
2011-05-13 19:23:55 +03:00
2011-06-03 18:12:31 +03:00
2011-04-05 10:45:45 +03:00
2011-05-16 14:12:12 +03:00
2011-05-13 19:23:54 +03:00
2011-05-16 14:12:12 +03:00
2011-05-16 14:12:15 +03:00
2011-02-06 15:08:02 +02:00
2011-06-12 17:45:34 -04:00