diff options
author | Karel Zak | 2011-04-13 16:27:18 +0200 |
---|---|---|
committer | Karel Zak | 2011-04-13 16:27:18 +0200 |
commit | 86cd58706a4ce8909bf9c706dc9b808aeea4b295 (patch) | |
tree | d0f677211fb0c46ab13522f7989558c1f835a5ff /shlibs/mount/src/lock.c | |
parent | libmount: merge mtab and utab locking code (diff) | |
download | kernel-qcow2-util-linux-86cd58706a4ce8909bf9c706dc9b808aeea4b295.tar.gz kernel-qcow2-util-linux-86cd58706a4ce8909bf9c706dc9b808aeea4b295.tar.xz kernel-qcow2-util-linux-86cd58706a4ce8909bf9c706dc9b808aeea4b295.zip |
libmount: use libmnt_lock for utab flock
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/lock.c')
-rw-r--r-- | shlibs/mount/src/lock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shlibs/mount/src/lock.c b/shlibs/mount/src/lock.c index daf204496..53c1115ec 100644 --- a/shlibs/mount/src/lock.c +++ b/shlibs/mount/src/lock.c @@ -88,7 +88,7 @@ struct libmnt_lock *mnt_new_lock(const char *datafile, pid_t id) ml->linkfile = ln; ml->lockfile = lo; - DBG(LOCKS, mnt_debug_h(ml, "alloc: linkfile=%s, lockfile=%s", ln, lo)); + DBG(LOCKS, mnt_debug_h(ml, "alloc: default linkfile=%s, lockfile=%s", ln, lo)); return ml; err: free(lo); @@ -160,7 +160,7 @@ int mnt_lock_use_simplelock(struct libmnt_lock *ml, int enable) else if (!ml->simplelock && endswith(ml->lockfile, ".lock")) memcpy(ml->lockfile + sz - 5, "~", 2); - DBG(LOCKS, mnt_debug_h(ml, "lock filename: '%s'", ml->lockfile)); + DBG(LOCKS, mnt_debug_h(ml, "new lock filename: '%s'", ml->lockfile)); return 0; } @@ -234,6 +234,7 @@ static int lock_simplelock(struct libmnt_lock *ml) rc = -errsv; goto err; } + ml->locked = 1; return 0; err: if (ml->sigblock) |