]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>
Sat, 27 Aug 2005 12:30:07 +0000 (14:30 +0200)
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>
Sat, 27 Aug 2005 12:30:07 +0000 (14:30 +0200)
1  2 
MAINTAINERS
fs/namei.c

diff --combined MAINTAINERS
index 2f7d1066c8d7d275dac951a0fb2774e3731a83a0,564a03e61a0c4b2322136ab9d96b3f121391ee83..1c5a8a5e65048968ac4b8702c9d1a56bac9899b2
@@@ -371,10 -371,7 +371,10 @@@ W:       http://atmelwlandriver.sourceforge.n
  S:    Maintained
  
  AUDIT SUBSYSTEM
 -L:    linux-audit@redhat.com (subscribers-only)
 +P:    David Woodhouse
 +M:    dwmw2@infradead.org
 +L:    linux-audit@redhat.com
 +W:    http://people.redhat.com/sgrubb/audit/
  S:    Maintained
  
  AX.25 NETWORK LAYER
@@@ -1742,7 -1739,7 +1742,7 @@@ S:      Maintaine
  
  OPL3-SA2, SA3, and SAx DRIVER
  P:    Zwane Mwaikambo
- M:    zwane@commfireservices.com
+ M:    zwane@arm.linux.org.uk
  L:    linux-sound@vger.kernel.org
  S:    Maintained
  
@@@ -1998,7 -1995,7 +1998,7 @@@ S:      Maintaine
  
  SC1200 WDT DRIVER
  P:    Zwane Mwaikambo
- M:    zwane@commfireservices.com
+ M:    zwane@arm.linux.org.uk
  S:    Maintained
  
  SCHEDULER
diff --combined fs/namei.c
index e2c1413a55c43a9ab7a3b6ec934adcccbd621c9a,6ec1f0fefc5b017aa321738f7d3581370a91fad3..91ce1f24bbb635b8d7922541be0df37419c203eb
@@@ -501,6 -501,7 +501,7 @@@ struct path 
  static inline int __do_follow_link(struct path *path, struct nameidata *nd)
  {
        int error;
+       void *cookie;
        struct dentry *dentry = path->dentry;
  
        touch_atime(path->mnt, dentry);
  
        if (path->mnt == nd->mnt)
                mntget(path->mnt);
-       error = dentry->d_inode->i_op->follow_link(dentry, nd);
-       if (!error) {
+       cookie = dentry->d_inode->i_op->follow_link(dentry, nd);
+       error = PTR_ERR(cookie);
+       if (!IS_ERR(cookie)) {
                char *s = nd_get_link(nd);
+               error = 0;
                if (s)
                        error = __vfs_follow_link(nd, s);
                if (dentry->d_inode->i_op->put_link)
-                       dentry->d_inode->i_op->put_link(dentry, nd);
+                       dentry->d_inode->i_op->put_link(dentry, nd, cookie);
        }
        dput(dentry);
        mntput(path->mnt);
@@@ -1043,7 -1046,7 +1046,7 @@@ int fastcall path_lookup(const char *na
  out:
        if (unlikely(current->audit_context
                     && nd && nd->dentry && nd->dentry->d_inode))
 -              audit_inode(name, nd->dentry->d_inode);
 +              audit_inode(name, nd->dentry->d_inode, flags);
        return retval;
  }
  
  int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen)
  {
        struct nameidata nd;
-       int res;
+       void *cookie;
        nd.depth = 0;
-       res = dentry->d_inode->i_op->follow_link(dentry, &nd);
-       if (!res) {
-               res = vfs_readlink(dentry, buffer, buflen, nd_get_link(&nd));
+       cookie = dentry->d_inode->i_op->follow_link(dentry, &nd);
+       if (!IS_ERR(cookie)) {
+               int res = vfs_readlink(dentry, buffer, buflen, nd_get_link(&nd));
                if (dentry->d_inode->i_op->put_link)
-                       dentry->d_inode->i_op->put_link(dentry, &nd);
+                       dentry->d_inode->i_op->put_link(dentry, &nd, cookie);
+               cookie = ERR_PTR(res);
        }
-       return res;
+       return PTR_ERR(cookie);
  }
  
  int vfs_follow_link(struct nameidata *nd, const char *link)
@@@ -2395,23 -2400,20 +2400,20 @@@ int page_readlink(struct dentry *dentry
        return res;
  }
  
int page_follow_link_light(struct dentry *dentry, struct nameidata *nd)
void *page_follow_link_light(struct dentry *dentry, struct nameidata *nd)
  {
-       struct page *page;
+       struct page *page = NULL;
        nd_set_link(nd, page_getlink(dentry, &page));
-       return 0;
+       return page;
  }
  
- void page_put_link(struct dentry *dentry, struct nameidata *nd)
+ void page_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
  {
-       if (!IS_ERR(nd_get_link(nd))) {
-               struct page *page;
-               page = find_get_page(dentry->d_inode->i_mapping, 0);
-               if (!page)
-                       BUG();
+       struct page *page = cookie;
+       if (page) {
                kunmap(page);
                page_cache_release(page);
-               page_cache_release(page);
        }
  }