]> err.no Git - util-linux/commit
mount: prevent loop mounting the same file twice
authorKarel Zak <kzak@redhat.com>
Tue, 11 Sep 2007 12:35:34 +0000 (14:35 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 25 Oct 2007 23:02:44 +0000 (01:02 +0200)
commit2368077223fa5800cf88659c9c57a7f6517f3fad
treef50e7a4fc58685921cd737f59b46f44183574083
parentbfdb8be5c49d8fadb25118fb4416ab2a68fc3a16
mount: prevent loop mounting the same file twice

The mount syscall prevents mounting the same device twice
to the same mountpoint. When loop mounting a file, for each
file a new loop device gets allocated, which prevents the detection
of loop mounting the same file to the same mountpoint twice.
The patch adds a check to prevent double mounts, if the same loopfile
is going to be mounted with the same offset to the same mountpoint.

Co-Author: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/lomount.c
mount/lomount.h
mount/mount.c