diff options
-rw-r--r-- | fs/ceph/snap.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c index 233d906aec02..4aa7122a8d38 100644 --- a/fs/ceph/snap.c +++ b/fs/ceph/snap.c | |||
@@ -338,12 +338,6 @@ static int build_snap_context(struct ceph_snap_realm *realm) | |||
338 | return 0; | 338 | return 0; |
339 | } | 339 | } |
340 | 340 | ||
341 | if (num == 0 && realm->seq == ceph_empty_snapc->seq) { | ||
342 | ceph_get_snap_context(ceph_empty_snapc); | ||
343 | snapc = ceph_empty_snapc; | ||
344 | goto done; | ||
345 | } | ||
346 | |||
347 | /* alloc new snap context */ | 341 | /* alloc new snap context */ |
348 | err = -ENOMEM; | 342 | err = -ENOMEM; |
349 | if (num > (SIZE_MAX - sizeof(*snapc)) / sizeof(u64)) | 343 | if (num > (SIZE_MAX - sizeof(*snapc)) / sizeof(u64)) |
@@ -381,7 +375,6 @@ static int build_snap_context(struct ceph_snap_realm *realm) | |||
381 | realm->ino, realm, snapc, snapc->seq, | 375 | realm->ino, realm, snapc, snapc->seq, |
382 | (unsigned int) snapc->num_snaps); | 376 | (unsigned int) snapc->num_snaps); |
383 | 377 | ||
384 | done: | ||
385 | ceph_put_snap_context(realm->cached_context); | 378 | ceph_put_snap_context(realm->cached_context); |
386 | realm->cached_context = snapc; | 379 | realm->cached_context = snapc; |
387 | return 0; | 380 | return 0; |