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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFz+JUthf-HAdYLzQH=r0niB4+X1ymn5egLpdhiptYXr7w@mail.gmail.com>
Date:	Fri, 16 Nov 2012 08:43:28 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Ian Kent <ikent@...hat.com>
Cc:	Kernel Mailing List <linux-kernel@...r.kernel.org>,
	autofs mailing list <autofs@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH] autofs4 - use simple_empty() for empty directory check

On Fri, Nov 16, 2012 at 8:36 AM, Ian Kent <ikent@...hat.com> wrote:
>
> Sure, are you recommending I alter the fs/libfs.c functions to add a
> function that doesn't have the outer lock, and have simple_empty() call
> that, then use it in autofs?

Yup. That's the standard pattern, although usually we *strive* to make
the unlocked versions be static to the internal code, and then use
them there for the various helpers. In your case that seems
impossible, since you do depend on holding the d_lock in the caller
after the tests. But at least we don't have to duplicate the code and
have it in two unrelated places.

Al? Comments?

            Linus
--
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