From: gkostka Date: Thu, 16 Feb 2017 22:22:36 +0000 (+0100) Subject: ext4: remove read-only check in get atime/mtime/ctime/mode/own methods X-Git-Url: https://main.carlh.net/gitweb/?p=lwext4.git;a=commitdiff_plain;h=ec5adbc6757768592da6917a07f6bc1c588ad2f8 ext4: remove read-only check in get atime/mtime/ctime/mode/own methods --- diff --git a/src/ext4.c b/src/ext4.c index 32d555f..6986e19 100644 --- a/src/ext4.c +++ b/src/ext4.c @@ -2166,9 +2166,6 @@ int ext4_mode_get(const char *path, uint32_t *mode) if (!mp) return ENOENT; - if (mp->fs.read_only) - return EROFS; - EXT4_MP_LOCK(mp); r = ext4_generic_open2(&f, path, O_RDONLY, EXT4_DE_UNKNOWN, NULL, NULL); @@ -2198,9 +2195,6 @@ int ext4_owner_get(const char *path, uint32_t *uid, uint32_t *gid) if (!mp) return ENOENT; - if (mp->fs.read_only) - return EROFS; - EXT4_MP_LOCK(mp); r = ext4_generic_open2(&f, path, O_RDONLY, EXT4_DE_UNKNOWN, NULL, NULL); @@ -2315,9 +2309,6 @@ int ext4_atime_get(const char *path, uint32_t *atime) if (!mp) return ENOENT; - if (mp->fs.read_only) - return EROFS; - EXT4_MP_LOCK(mp); r = ext4_generic_open2(&f, path, O_RDONLY, EXT4_DE_UNKNOWN, NULL, NULL); @@ -2347,9 +2338,6 @@ int ext4_mtime_get(const char *path, uint32_t *mtime) if (!mp) return ENOENT; - if (mp->fs.read_only) - return EROFS; - EXT4_MP_LOCK(mp); r = ext4_generic_open2(&f, path, O_RDONLY, EXT4_DE_UNKNOWN, NULL, NULL); @@ -2379,9 +2367,6 @@ int ext4_ctime_get(const char *path, uint32_t *ctime) if (!mp) return ENOENT; - if (mp->fs.read_only) - return EROFS; - EXT4_MP_LOCK(mp); r = ext4_generic_open2(&f, path, O_RDONLY, EXT4_DE_UNKNOWN, NULL, NULL);