Mercurial > nomad
changeset 824:97cd91630768
objstore: remove read/write obj op checks
They just clutter up the code. At the moment we don't support read-only
volumes and therefore not implementing read and write ops is a major bug
(and therefore it is ok to SIGSEGV as a result.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Mon, 13 Apr 2020 20:09:13 -0400 |
parents | a525d07c3fda |
children | 4b2c0b57b756 |
files | src/objstore/obj_ops.c |
diffstat | 1 files changed, 0 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/src/objstore/obj_ops.c Mon Apr 13 20:08:13 2020 -0400 +++ b/src/objstore/obj_ops.c Mon Apr 13 20:09:13 2020 -0400 @@ -278,9 +278,6 @@ obj = open->obj; - if (!obj->ops || !obj->ops->read) - return -ENOTSUP; - /* nothing to do */ if (!len) return 0; @@ -312,9 +309,6 @@ obj = open->obj; - if (!obj->ops || !obj->ops->write) - return -ENOTSUP; - if (open->qualified) return -EROFS; @@ -388,9 +382,6 @@ dir = diropen->obj; - if (!dir->ops || !dir->ops->read) - return -ENOTSUP; - *type = NDIRENT_TYPE_UNKNOWN; /* unknown by default */ MXLOCK(&dir->lock); @@ -415,9 +406,6 @@ dir = diropen->obj; - if (!dir->ops || !dir->ops->read) - return -ENOTSUP; - MXLOCK(&dir->lock); if (!NATTR_ISDIR(diropen->ver->attrs.mode)) ret = -ENOTDIR; @@ -440,9 +428,6 @@ dir = diropen->obj; - if (!dir->ops || !dir->ops->read || !dir->ops->write) - return -ENOTSUP; - if (diropen->qualified) return -EROFS; @@ -485,9 +470,6 @@ dir = diropen->obj; - if (!dir->ops || !dir->ops->read || !dir->ops->write) - return -ENOTSUP; - if (diropen->qualified) return -EROFS; @@ -535,9 +517,6 @@ dir = diropen->obj; - if (!dir->ops || !dir->ops->read) - return -ENOTSUP; - /* clear whatever garbage the user may have supplied */ child->ino = 0;