In generic/38[3456], we use quotactl(2) to check if prjquota is
enabled on the given device (src/feature -P $dev in _require_prjquota),
and quotactl(2) requires the given device is a mounted device.
So it requires dump.f2fs to list/check enabled features on a mounted
device, let's relieve to allow such operation.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
#ifndef ANDROID_WINDOWS_HOST
static int open_check_fs(char *path, int flag)
{
- if (c.func != FSCK || c.fix_on || c.auto_fix)
+ if (c.func != DUMP && (c.func != FSCK || c.fix_on || c.auto_fix))
return -1;
/* allow to open ro */
return -1;
}
- if (S_ISBLK(stat_buf->st_mode) && !c.force) {
+ if (S_ISBLK(stat_buf->st_mode) && !c.force && c.func != DUMP) {
fd = open(dev->path, O_RDWR | O_EXCL);
if (fd < 0)
fd = open_check_fs(dev->path, O_EXCL);