diff options
author | Sage Weil <sage@newdream.net> | 2009-11-21 16:08:14 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-11-21 16:08:14 -0500 |
commit | 75eb3592811028e5b01835126483d115532a3aa1 (patch) | |
tree | 657fb05f45b2fafea08f5b38cbf6282fc5d8493f /fs/ceph/snap.c | |
parent | 32c895e776a0dd2cb701d60fbd6440280c09ce35 (diff) |
ceph: remove useless IS_ERR checks
ceph_lookup_snap_realm either returns a valid pointer or NULL; there is no
need to check IS_ERR(result).
Reported-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/snap.c')
-rw-r--r-- | fs/ceph/snap.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c index 2e3cb40b7e48..52f46a1208f5 100644 --- a/fs/ceph/snap.c +++ b/fs/ceph/snap.c | |||
@@ -226,8 +226,6 @@ static int adjust_snap_realm_parent(struct ceph_mds_client *mdsc, | |||
226 | return 0; | 226 | return 0; |
227 | 227 | ||
228 | parent = ceph_lookup_snap_realm(mdsc, parentino); | 228 | parent = ceph_lookup_snap_realm(mdsc, parentino); |
229 | if (IS_ERR(parent)) | ||
230 | return PTR_ERR(parent); | ||
231 | if (!parent) { | 229 | if (!parent) { |
232 | parent = ceph_create_snap_realm(mdsc, parentino); | 230 | parent = ceph_create_snap_realm(mdsc, parentino); |
233 | if (IS_ERR(parent)) | 231 | if (IS_ERR(parent)) |
@@ -541,10 +539,6 @@ more: | |||
541 | p += sizeof(u64) * le32_to_cpu(ri->num_prior_parent_snaps); | 539 | p += sizeof(u64) * le32_to_cpu(ri->num_prior_parent_snaps); |
542 | 540 | ||
543 | realm = ceph_lookup_snap_realm(mdsc, le64_to_cpu(ri->ino)); | 541 | realm = ceph_lookup_snap_realm(mdsc, le64_to_cpu(ri->ino)); |
544 | if (IS_ERR(realm)) { | ||
545 | err = PTR_ERR(realm); | ||
546 | goto fail; | ||
547 | } | ||
548 | if (!realm) { | 542 | if (!realm) { |
549 | realm = ceph_create_snap_realm(mdsc, le64_to_cpu(ri->ino)); | 543 | realm = ceph_create_snap_realm(mdsc, le64_to_cpu(ri->ino)); |
550 | if (IS_ERR(realm)) { | 544 | if (IS_ERR(realm)) { |
@@ -762,8 +756,6 @@ void ceph_handle_snap(struct ceph_mds_client *mdsc, | |||
762 | ri = p; | 756 | ri = p; |
763 | 757 | ||
764 | realm = ceph_lookup_snap_realm(mdsc, split); | 758 | realm = ceph_lookup_snap_realm(mdsc, split); |
765 | if (IS_ERR(realm)) | ||
766 | goto out; | ||
767 | if (!realm) { | 759 | if (!realm) { |
768 | realm = ceph_create_snap_realm(mdsc, split); | 760 | realm = ceph_create_snap_realm(mdsc, split); |
769 | if (IS_ERR(realm)) | 761 | if (IS_ERR(realm)) |
@@ -829,8 +821,6 @@ skip_inode: | |||
829 | struct ceph_snap_realm *child = | 821 | struct ceph_snap_realm *child = |
830 | ceph_lookup_snap_realm(mdsc, | 822 | ceph_lookup_snap_realm(mdsc, |
831 | le64_to_cpu(split_realms[i])); | 823 | le64_to_cpu(split_realms[i])); |
832 | if (IS_ERR(child)) | ||
833 | continue; | ||
834 | if (!child) | 824 | if (!child) |
835 | continue; | 825 | continue; |
836 | adjust_snap_realm_parent(mdsc, child, realm->ino); | 826 | adjust_snap_realm_parent(mdsc, child, realm->ino); |