diff options
Diffstat (limited to 'fs/ceph/snap.c')
-rw-r--r-- | fs/ceph/snap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c index f04c0961f993..e5206fc76562 100644 --- a/fs/ceph/snap.c +++ b/fs/ceph/snap.c | |||
@@ -331,7 +331,7 @@ static int build_snap_context(struct ceph_snap_realm *realm) | |||
331 | 331 | ||
332 | /* alloc new snap context */ | 332 | /* alloc new snap context */ |
333 | err = -ENOMEM; | 333 | err = -ENOMEM; |
334 | if (num > (ULONG_MAX - sizeof(*snapc)) / sizeof(u64)) | 334 | if (num > (SIZE_MAX - sizeof(*snapc)) / sizeof(u64)) |
335 | goto fail; | 335 | goto fail; |
336 | snapc = kzalloc(sizeof(*snapc) + num*sizeof(u64), GFP_NOFS); | 336 | snapc = kzalloc(sizeof(*snapc) + num*sizeof(u64), GFP_NOFS); |
337 | if (!snapc) | 337 | if (!snapc) |