summaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.c
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-06-07 13:43:35 -0700
committerSage Weil <sage@inktank.com>2012-07-30 09:29:54 -0700
commit8842b3be96c376f174ae0d4f282d14728ad5febf (patch)
treeaa7b7380285d7806c4e2a6a1080a169e379505d3 /fs/ceph/mds_client.c
parenta2a3258417eb6a1799cf893350771428875a8287 (diff)
downloadop-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.c11
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)) {
OpenPOWER on IntegriCloud