Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1274464

Re: [RFC] readlink()-related oddities

From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject Re: [RFC] readlink()-related oddities
Date 2015-11-20 23:40 +0100
Message-ID <qx2vw-50g-9@gated-at.bofh.it> (permalink)
References <qwGOm-7Dg-15@gated-at.bofh.it> <qwQE2-5uX-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Nov 20, 2015 at 09:59:05AM +0000, David Howells wrote:

> There's an AFS userspace command that could be used to query a mountpoint that
> was going to use it.  However, I suspect readlink() will now always trigger
> the automount.

It won't, actually.  All we are passing to user_path_at_empty() is
LOOKUP_EMPTY, so for the final component we'll have
        if (!(nd->flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY |
                           LOOKUP_OPEN | LOOKUP_CREATE | LOOKUP_AUTOMOUNT)) &&
            path->dentry->d_inode)
                return -EISDIR;
in follow_automount() trigger and follow_managed() will turn that -EISDIR
into 0.  IOW, readlink(2) does work on those, same as stat() (since Sep 2011).

Sigh...  OK, let's leave it for now; ->open() for those guys is completely
bogus, AFAICS, but that's local bogo^Wbusiness.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC] readlink()-related oddities Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-20 00:30 +0100
  Re: [RFC] readlink()-related oddities Linus Torvalds <torvalds@linux-foundation.org> - 2015-11-20 03:20 +0100
    Re: [RFC] readlink()-related oddities Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-20 04:00 +0100
      Re: [RFC] readlink()-related oddities Linus Torvalds <torvalds@linux-foundation.org> - 2015-11-20 04:10 +0100
        Re: [RFC] readlink()-related oddities Linus Torvalds <torvalds@linux-foundation.org> - 2015-11-20 04:20 +0100
          Re: [RFC] readlink()-related oddities Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-20 04:30 +0100
      Re: [RFC] readlink()-related oddities David Howells <dhowells@redhat.com> - 2015-11-20 11:10 +0100
  Re: [RFC] readlink()-related oddities David Howells <dhowells@redhat.com> - 2015-11-20 11:00 +0100
    Re: [RFC] readlink()-related oddities Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-20 17:10 +0100
      Re: [RFC] readlink()-related oddities David Howells <dhowells@redhat.com> - 2015-11-20 17:30 +0100
    Re: [RFC] readlink()-related oddities Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-20 23:40 +0100

csiph-web