From: Dave Reisner Date: Mon, 26 Dec 2011 22:10:23 +0000 (-0500) Subject: libmount: avoid resolving pseudofs source on update X-Git-Tag: v2.21-rc1~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee83edede1f80666806002248e89168ee41a6cc0;p=thirdparty%2Futil-linux.git 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 --- 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) */