From ee83edede1f80666806002248e89168ee41a6cc0 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 26 Dec 2011 17:10:23 -0500 Subject: [PATCH] libmount: avoid resolving pseudofs source on update Similar to the previous commit, when mounting a pseudofs, trust the source of the fs, as it cannot be matched to backing device on the filesystem. Similar situation, but slightly different bug: # mkdir /foo /root/foo # echo 'foo /foo tmpfs defaults 0 0' >> /etc/fstab # cd /root # mount -a # mount | grep /foo /root/foo on /foo type tmpfs (rw,relatime) This fixes the pure libmount based mount utility, but the legacy mount tool will still fail to handle this properly. Signed-off-by: Dave Reisner Signed-off-by: Karel Zak --- libmount/src/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmount/src/context.c b/libmount/src/context.c index c61a144736..7dc4731847 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -1101,7 +1101,7 @@ int mnt_context_prepare_srcpath(struct libmnt_context *cxt) rc = path ? mnt_fs_set_source(cxt->fs, path) : -EINVAL; - } else if (cache) { + } else if (cache && !(cxt->fs->flags & MNT_FS_PSEUDO)) { /* * Source is PATH (canonicalize) */ -- 2.47.3