Skip to content

Commit

Permalink
unroll do_last: loop in do_filp_open()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Mar 5, 2010
1 parent 3343eb8 commit 27bff34
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1845,8 +1845,6 @@ struct file *do_filp_open(int dfd, const char *pathname,
mutex_lock(&dir->d_inode->i_mutex);
path.dentry = lookup_hash(&nd);
path.mnt = nd.path.mnt;

do_last:
filp = do_last(&nd, &path, open_flag, flag, acc_mode, mode,
pathname, dir, &is_link);
if (is_link)
Expand Down Expand Up @@ -1926,7 +1924,13 @@ struct file *do_filp_open(int dfd, const char *pathname,
path.dentry = lookup_hash(&nd);
path.mnt = nd.path.mnt;
__putname(nd.last.name);
goto do_last;
filp = do_last(&nd, &path, open_flag, flag, acc_mode, mode,
pathname, dir, &is_link);
if (is_link)
goto do_link;
if (nd.root.mnt)
path_put(&nd.root);
return filp;
}

/**
Expand Down

0 comments on commit 27bff34

Please sign in to comment.