提交 06d7137e 编写于 作者: A Al Viro

namei: make set_root_rcu() return void

The only caller that cares about its return value can just
as easily pick it from nd->root_seq itself.  We used to just
calculate it and return to caller, but these days we are
storing it in nd->root_seq in all cases.
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 dc3f4198
...@@ -792,7 +792,7 @@ static void set_root(struct nameidata *nd) ...@@ -792,7 +792,7 @@ static void set_root(struct nameidata *nd)
get_fs_root(current->fs, &nd->root); get_fs_root(current->fs, &nd->root);
} }
static unsigned set_root_rcu(struct nameidata *nd) static void set_root_rcu(struct nameidata *nd)
{ {
struct fs_struct *fs = current->fs; struct fs_struct *fs = current->fs;
unsigned seq; unsigned seq;
...@@ -802,7 +802,6 @@ static unsigned set_root_rcu(struct nameidata *nd) ...@@ -802,7 +802,6 @@ static unsigned set_root_rcu(struct nameidata *nd)
nd->root = fs->root; nd->root = fs->root;
nd->root_seq = __read_seqcount_begin(&nd->root.dentry->d_seq); nd->root_seq = __read_seqcount_begin(&nd->root.dentry->d_seq);
} while (read_seqcount_retry(&fs->seq, seq)); } while (read_seqcount_retry(&fs->seq, seq));
return nd->root_seq;
} }
static void path_put_conditional(struct path *path, struct nameidata *nd) static void path_put_conditional(struct path *path, struct nameidata *nd)
...@@ -1998,7 +1997,8 @@ static const char *path_init(struct nameidata *nd, unsigned flags) ...@@ -1998,7 +1997,8 @@ static const char *path_init(struct nameidata *nd, unsigned flags)
if (*s == '/') { if (*s == '/') {
if (flags & LOOKUP_RCU) { if (flags & LOOKUP_RCU) {
rcu_read_lock(); rcu_read_lock();
nd->seq = set_root_rcu(nd); set_root_rcu(nd);
nd->seq = nd->root_seq;
} else { } else {
set_root(nd); set_root(nd);
path_get(&nd->root); path_get(&nd->root);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册