diff options
author | Etienne Dechamps <[email protected]> | 2012-09-27 16:05:15 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-10-03 13:32:48 -0700 |
commit | 274091c07482773c7e81cbe70f0b46b4606048d0 (patch) | |
tree | 62f1c63c6846ce3de806703c73fc333c83691f81 | |
parent | 0aebd4f9e3223e8f1e09de7b29bba4f375db840c (diff) |
Fix VOP_CLOSE() in userspace.
Currently, for unknown reasons, VOP_CLOSE() is a no-op in userspace.
This causes file descriptor leaks. This is especially problematic with
long ztest runs, since zpool.cache is opened repeatedly and never
closed, resulting in resource exhaustion (EMFILE errors).
This patch fixes the issue by making VOP_CLOSE() do what it is supposed
to do.
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #989
-rw-r--r-- | include/sys/zfs_context.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index d8347a335..ad282c43c 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -495,7 +495,7 @@ typedef struct vsecattr { extern int fop_getattr(vnode_t *vp, vattr_t *vap); -#define VOP_CLOSE(vp, f, c, o, cr, ct) 0 +#define VOP_CLOSE(vp, f, c, o, cr, ct) vn_close(vp) #define VOP_PUTPAGE(vp, of, sz, fl, cr, ct) 0 #define VOP_GETATTR(vp, vap, fl, cr, ct) fop_getattr((vp), (vap)); |