diff options
author | Stanislav Brabec | 2016-07-14 15:29:09 +0200 |
---|---|---|
committer | Karel Zak | 2016-08-03 11:53:28 +0200 |
commit | 74a4705a993ce475d95c1c20d0cc4eb740b0c933 (patch) | |
tree | 3d8f1ccfcd24f17448830c6f1977566917e31092 /libmount/src/context_umount.c | |
parent | mount: Handle MNT_ERR_LOOPOVERLAP (diff) | |
download | kernel-qcow2-util-linux-74a4705a993ce475d95c1c20d0cc4eb740b0c933.tar.gz kernel-qcow2-util-linux-74a4705a993ce475d95c1c20d0cc4eb740b0c933.tar.xz kernel-qcow2-util-linux-74a4705a993ce475d95c1c20d0cc4eb740b0c933.zip |
Add sizelimit to internal API
Fully safe checks of loop device need to check sizelimit. To prevent need of two
nearly equal functions, introduce sizelimit parameter to several internal
functions:
loopdev_is_used()
loopdev_find_by_backing_file()
loopcxt_is_used()
loopcxt_find_by_backing_file()
If sizelimit is zero, fall back to the old behavior (ignoring of sizelimit).
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Diffstat (limited to 'libmount/src/context_umount.c')
-rw-r--r-- | libmount/src/context_umount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c index d003c5def..28787dab1 100644 --- a/libmount/src/context_umount.c +++ b/libmount/src/context_umount.c @@ -328,7 +328,7 @@ static int is_associated_fs(const char *devname, struct libmnt_fs *fs) return 0; } - return loopdev_is_used(devname, src, offset, flags); + return loopdev_is_used(devname, src, offset, 0, flags); } static int prepare_helper_from_options(struct libmnt_context *cxt, |