]> git.baikalelectronics.ru Git - kernel.git/commit
afs: fix sget() races, close leak on umount
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 Jun 2011 20:01:21 +0000 (16:01 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 Jun 2011 21:45:36 +0000 (17:45 -0400)
commitc255e94a1bbe50a713f7b0dc64e771f6c3ea0c34
tree2de96109524026f5e3b2bf6d9e3a6999716c8bde
parenta6bc8c67f64910aa3fec2cad9bb3c0cc4f64b241
afs: fix sget() races, close leak on umount

* set ->s_fs_info in set() callback passed to sget()
* allocate the thing and set it up enough for afs_test_super() before
making it visible
* have it freed in ->kill_sb() (current tree simply leaks it)
* have ->put_super() leave ->s_fs_info->volume alone; it's too early for
dropping it; do that from ->kill_sb() after having called kill_anon_super().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/afs/super.c