summaryrefslogtreecommitdiffstats
path: root/libmount/src/context.c
diff options
context:
space:
mode:
authorKarel Zak2012-08-24 18:13:06 +0200
committerKarel Zak2012-08-24 18:29:51 +0200
commit975e14bd4abaf5635ce0783f3ecddb87449cc05a (patch)
treea4add5810c4fd13171144eaad0f61b9ac98a58ff /libmount/src/context.c
parentbuild-sys: release++ (v2.22-rc2) (diff)
downloadkernel-qcow2-util-linux-975e14bd4abaf5635ce0783f3ecddb87449cc05a.tar.gz
kernel-qcow2-util-linux-975e14bd4abaf5635ce0783f3ecddb87449cc05a.tar.xz
kernel-qcow2-util-linux-975e14bd4abaf5635ce0783f3ecddb87449cc05a.zip
libmount: rewrite mnt_table_is_fs_mounted() to be less aggressive
The old implementation always canonicalizes target (mountpoint) path. It's better to postpone this operation until the path is really necessary (usually it's unnecessary), because readlink() on mountpoint may trigger automounts. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context.c')
-rw-r--r--libmount/src/context.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmount/src/context.c b/libmount/src/context.c
index bfc418cd8..d6f905039 100644
--- a/libmount/src/context.c
+++ b/libmount/src/context.c
@@ -1963,6 +1963,8 @@ int mnt_context_helper_setopt(struct libmnt_context *cxt, int c, char *arg)
* @fs: filesystem
* @mounted: returns 1 for mounted and 0 for non-mounted filesystems
*
+ * Please, read mnt_table_is_fs_mounted() description!
+ *
* Returns: 0 on success and negative number in case of error.
*/
int mnt_context_is_fs_mounted(struct libmnt_context *cxt,