diff options
author | Sage Weil <sage@inktank.com> | 2012-06-07 13:43:35 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-07-30 09:29:54 -0700 |
commit | 8842b3be96c376f174ae0d4f282d14728ad5febf (patch) | |
tree | aa7b7380285d7806c4e2a6a1080a169e379505d3 /fs/ceph/mds_client.c | |
parent | a2a3258417eb6a1799cf893350771428875a8287 (diff) | |
download | op-kernel-dev-8842b3be96c376f174ae0d4f282d14728ad5febf.zip op-kernel-dev-8842b3be96c376f174ae0d4f282d14728ad5febf.tar.gz |
ceph: clean up useless d_parent checks
d_parent is never NULL, and IS_ROOT() is the proper way to check for a
(non-self-referential) parent.
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 5ac6434..418f6a8 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -1469,11 +1469,6 @@ retry: else len += 1 + temp->d_name.len; temp = temp->d_parent; - if (temp == NULL) { - rcu_read_unlock(); - pr_err("build_path corrupt dentry %p\n", dentry); - return ERR_PTR(-EINVAL); - } } rcu_read_unlock(); if (len) @@ -1510,12 +1505,6 @@ retry: if (pos) path[--pos] = '/'; temp = temp->d_parent; - if (temp == NULL) { - rcu_read_unlock(); - pr_err("build_path corrupt dentry\n"); - kfree(path); - return ERR_PTR(-EINVAL); - } } rcu_read_unlock(); if (pos != 0 || read_seqretry(&rename_lock, seq)) { |