lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 13 Feb 2012 15:24:18 +0100
From:	Jan Kara <jack@...e.cz>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Jan Kara <jack@...e.cz>, LKML <linux-kernel@...r.kernel.org>,
	linux-fsdevel@...r.kernel.org, Dave Chinner <david@...morbit.com>,
	mpatocka@...hat.com, Eric Sandeen <sandeen@...deen.net>
Subject: Re: [PATCH 1/2] vfs: Provide function to get superblock and wait
 for it to thaw

On Sun 12-02-12 21:13:25, Al Viro wrote:
> On Fri, Feb 10, 2012 at 11:03:00AM +0100, Jan Kara wrote:
> > In quota code we need to find a superblock corresponding to a device and wait
> > for superblock to be unfrozen. However this waiting has to happen without
> > s_umount semaphore because that is required for superblock to thaw. So provide
> > a function in VFS for this to keep dances with s_umount where they belong.
> 
> Eww...  All it takes is
> struct super_block *get_super_thawed(struct block_device *bdev)
> {
>         while (1) {
>                 struct super_block *s = get_super(bdev);
>                 if (!s || s->s_frozen == SB_UNFROZEN)
>                         return s;
> 		up_read(&s->s_umount);
> 		vfs_check_frozen(s, SB_FREEZE_WRITE);
> 		put_super(s);
>         }
> }
> and there's no need of extra arguments, etc. whatsoever.  Both patches
> applied, with implementation of get_super_thawed() done as above.
  Yeah, this looks better. Thanks!

									Honza
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ