common/quota: allow removing quota options entirely in _qmount_option
authorChristoph Hellwig <hch@lst.de>
Thu, 22 Jul 2021 07:38:26 +0000 (09:38 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 25 Jul 2021 14:44:27 +0000 (22:44 +0800)
Add support for dropping all quota related options instead of only
overriding them with new ones to _qmount_option.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/quota

index 883a28a..7fa1a61 100644 (file)
@@ -263,7 +263,9 @@ _qmount_option()
                        -e 's/prjquota/quota/g'`
        fi
        # Ensure we have the given quota option - duplicates are fine
-       export MOUNT_OPTIONS="$MOUNT_OPTIONS -o $OPTS"
+       if [ -n "$OPTS" ]; then
+               export MOUNT_OPTIONS="$MOUNT_OPTIONS -o $OPTS"
+       fi
        echo "MOUNT_OPTIONS = $MOUNT_OPTIONS" >>$seqres.full
 }