summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/glfs-internal.h')
-rw-r--r--api/src/glfs-internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/glfs-internal.h b/api/src/glfs-internal.h
index 3f8ac92ac7e..ff8ace9cbb8 100644
--- a/api/src/glfs-internal.h
+++ b/api/src/glfs-internal.h
@@ -268,8 +268,8 @@ do { \
#define __GLFS_ENTRY_VALIDATE_FD(glfd, label) \
do { \
- if (!glfd) { \
- errno = EINVAL; \
+ if (!glfd || !glfd->fd || !glfd->fd->inode) { \
+ errno = EBADF; \
goto label; \
} \
old_THIS = THIS; \