From: Al Viro Date: Wed, 6 May 2009 05:07:50 +0000 (-0400) Subject: New helper: deactivate_locked_super() X-Git-Tag: linux-omap-v2.6.30-rc6~44^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74dbbdd7fdc11763f4698d2f3e684cf4446951e6;p=pandora-kernel.git New helper: deactivate_locked_super() Does equivalent of up_write(&s->s_umount); deactivate_super(s); However, it does not does not unlock it until it's all over. As the result, it's safe to use to dispose of new superblock on ->get_sb() failure exits - nobody will see the sucker until it's all over. Equivalent using up_write/deactivate_super is safe for that purpose if superblock is either safe to use or has NULL ->s_root when we unlock. Normally filesystems take the required precautions, but a) we do have bugs in that area in some of them. b) up_write/deactivate_super sequence is extremely common, so the helper makes sense anyway. Signed-off-by: Al Viro --- Reading git-diff-tree failed