librbd: return -ENOENT from diff_iterate when the snap doesn't exist

This is a bit more helpful than -EINVAL.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
Josh Durgin 2013-03-30 17:28:35 -07:00
parent 6a04a7fa56
commit 33d1a2fc88

View File

@ -2315,7 +2315,7 @@ reprotect_and_return_err:
ictx->snap_lock.put_read();
ictx->md_lock.put_read();
if (from_snap_id == CEPH_NOSNAP) {
return -EINVAL;
return -ENOENT;
}
if (from_snap_id == end_snap_id) {
// no diff.