diff mbox

[09/13] VFS/namei: enable RCU-walk when following symlinks.

Message ID 20150316044320.23648.43776.stgit@notabene.brown (mailing list archive)
State New, archived
Headers show

Commit Message

NeilBrown March 16, 2015, 4:43 a.m. UTC
Now that follow_link handles LOOKUP_RCU, we do not need to
'unlazy_walk' when a symlink is found.

Signed-off-by: NeilBrown <neilb@suse.de>
---
 fs/namei.c |   12 ------------
 1 file changed, 12 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Al Viro March 16, 2015, 10:44 p.m. UTC | #1
On Mon, Mar 16, 2015 at 03:43:20PM +1100, NeilBrown wrote:
>  	if (should_follow_link(path->dentry, follow)) {
> -		if (nd->flags & LOOKUP_RCU) {
> -			if (unlikely(unlazy_walk(nd, path->dentry))) {
> -				err = -ECHILD;
> -				goto out_err;
> -			}
> -		}
>  		BUG_ON(inode != path->dentry->d_inode);

... and now this BUG_ON() can bloody well be triggered.
>  	if (should_follow_link(path->dentry, !symlink_ok)) {
> -		if (nd->flags & LOOKUP_RCU) {
> -			if (unlikely(unlazy_walk(nd, path->dentry))) {
> -				error = -ECHILD;
> -				goto out;
> -			}
> -		}
>  		BUG_ON(inode != path->dentry->d_inode);

So can this.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/namei.c b/fs/namei.c
index 536e0254f5f1..c9c58cd1af2a 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1631,12 +1631,6 @@  static inline int walk_component(struct nameidata *nd, struct path *path,
 		goto out_path_put;
 
 	if (should_follow_link(path->dentry, follow)) {
-		if (nd->flags & LOOKUP_RCU) {
-			if (unlikely(unlazy_walk(nd, path->dentry))) {
-				err = -ECHILD;
-				goto out_err;
-			}
-		}
 		BUG_ON(inode != path->dentry->d_inode);
 		return 1;
 	}
@@ -3093,12 +3087,6 @@  finish_lookup:
 	}
 
 	if (should_follow_link(path->dentry, !symlink_ok)) {
-		if (nd->flags & LOOKUP_RCU) {
-			if (unlikely(unlazy_walk(nd, path->dentry))) {
-				error = -ECHILD;
-				goto out;
-			}
-		}
 		BUG_ON(inode != path->dentry->d_inode);
 		return 1;
 	}