mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
ceph: use ceph_create_snap_context()
Now that we have a library routine to create snap contexts, use it.
This is part of:
http://tracker.ceph.com/issues/4857
Signed-off-by: Alex Elder <[email protected]>
Reviewed-by: Josh Durgin <[email protected]>
This commit is contained in:
parent
4f0dcb10cf
commit
812164f8c3
2 changed files with 7 additions and 37 deletions
|
|
@ -332,10 +332,9 @@ static int build_snap_context(struct ceph_snap_realm *realm)
|
|||
err = -ENOMEM;
|
||||
if (num > (SIZE_MAX - sizeof(*snapc)) / sizeof(u64))
|
||||
goto fail;
|
||||
snapc = kzalloc(sizeof(*snapc) + num*sizeof(u64), GFP_NOFS);
|
||||
snapc = ceph_create_snap_context(num, GFP_NOFS);
|
||||
if (!snapc)
|
||||
goto fail;
|
||||
atomic_set(&snapc->nref, 1);
|
||||
|
||||
/* build (reverse sorted) snap vector */
|
||||
num = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue