1. 11 5月, 2015 1 次提交
    • A
      new ->follow_link() and ->put_link() calling conventions · 680baacb
      Al Viro 提交于
      a) instead of storing the symlink body (via nd_set_link()) and returning
      an opaque pointer later passed to ->put_link(), ->follow_link() _stores_
      that opaque pointer (into void * passed by address by caller) and returns
      the symlink body.  Returning ERR_PTR() on error, NULL on jump (procfs magic
      symlinks) and pointer to symlink body for normal symlinks.  Stored pointer
      is ignored in all cases except the last one.
      
      Storing NULL for opaque pointer (or not storing it at all) means no call
      of ->put_link().
      
      b) the body used to be passed to ->put_link() implicitly (via nameidata).
      Now only the opaque pointer is.  In the cases when we used the symlink body
      to free stuff, ->follow_link() now should store it as opaque pointer in addition
      to returning it.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      680baacb
  2. 16 4月, 2015 1 次提交
  3. 05 8月, 2014 1 次提交
    • E
      proc: Implement /proc/thread-self to point at the directory of the current thread · 0097875b
      Eric W. Biederman 提交于
      /proc/thread-self is derived from /proc/self.  /proc/thread-self
      points to the directory in proc containing information about the
      current thread.
      
      This funtionality has been missing for a long time, and is tricky to
      implement in userspace as gettid() is not exported by glibc.  More
      importantly this allows fixing defects in /proc/mounts and /proc/net
      where in a threaded application today they wind up being empty files
      when only the initial pthread has exited, causing problems for other
      threads.
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      0097875b