From 65c310dccf2653f815cd633afed1bfc684a7b643 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 9 Aug 2009 01:32:02 +0400 Subject: [PATCH] --- yaml --- r: 177393 b: refs/heads/master c: 258fa99905f704afed1a43f195bc5235a56fb895 h: refs/heads/master i: 177391: 9502b0502b1d3c75fe7de950fff3cb7a97e39437 v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 7098b98efce0..ae0d96e139ad 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d231412db66355e72d606f8403ee8b6bd8ad4f9a +refs/heads/master: 258fa99905f704afed1a43f195bc5235a56fb895 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 87f97ba90ad1..30c61c298b4c 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -644,8 +644,6 @@ static __always_inline int __do_follow_link(struct path *path, struct nameidata if (dentry->d_inode->i_op->put_link) dentry->d_inode->i_op->put_link(dentry, nd, cookie); } - path_put(path); - return error; } @@ -672,6 +670,7 @@ static inline int do_follow_link(struct path *path, struct nameidata *nd) current->total_link_count++; nd->depth++; err = __do_follow_link(path, nd); + path_put(path); current->link_count--; nd->depth--; return err; @@ -1864,6 +1863,7 @@ struct file *do_filp_open(int dfd, const char *pathname, if (error) goto exit_dput; error = __do_follow_link(&path, &nd); + path_put(&path); if (error) { /* Does someone understand code flow here? Or it is only * me so stupid? Anathema to whoever designed this non-sense