diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-06-29 12:07:04 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-06-29 12:07:04 -0400 |
commit | 06d7137e5c566e1e8a4acd4a30e7e12170a57b58 (patch) | |
tree | 85eb52e3353daeb39ad4805061467658cb31e4ea | |
parent | dc3f4198eac14e52a98dfc79cd84b45e280f59cd (diff) |
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: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/namei.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/namei.c b/fs/namei.c index 2dad0eaf91d3..ae4e4c18b2ac 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -792,7 +792,7 @@ static void set_root(struct nameidata *nd) | |||
792 | get_fs_root(current->fs, &nd->root); | 792 | get_fs_root(current->fs, &nd->root); |
793 | } | 793 | } |
794 | 794 | ||
795 | static unsigned set_root_rcu(struct nameidata *nd) | 795 | static void set_root_rcu(struct nameidata *nd) |
796 | { | 796 | { |
797 | struct fs_struct *fs = current->fs; | 797 | struct fs_struct *fs = current->fs; |
798 | unsigned seq; | 798 | unsigned seq; |
@@ -802,7 +802,6 @@ static unsigned set_root_rcu(struct nameidata *nd) | |||
802 | nd->root = fs->root; | 802 | nd->root = fs->root; |
803 | nd->root_seq = __read_seqcount_begin(&nd->root.dentry->d_seq); | 803 | nd->root_seq = __read_seqcount_begin(&nd->root.dentry->d_seq); |
804 | } while (read_seqcount_retry(&fs->seq, seq)); | 804 | } while (read_seqcount_retry(&fs->seq, seq)); |
805 | return nd->root_seq; | ||
806 | } | 805 | } |
807 | 806 | ||
808 | static void path_put_conditional(struct path *path, struct nameidata *nd) | 807 | 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 | if (*s == '/') { | 1997 | if (*s == '/') { |
1999 | if (flags & LOOKUP_RCU) { | 1998 | if (flags & LOOKUP_RCU) { |
2000 | rcu_read_lock(); | 1999 | rcu_read_lock(); |
2001 | nd->seq = set_root_rcu(nd); | 2000 | set_root_rcu(nd); |
2001 | nd->seq = nd->root_seq; | ||
2002 | } else { | 2002 | } else { |
2003 | set_root(nd); | 2003 | set_root(nd); |
2004 | path_get(&nd->root); | 2004 | path_get(&nd->root); |