Skip to content

Commit

Permalink
Fix VOP_CLOSE() in userspace.
Browse files Browse the repository at this point in the history
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 <behlendorf1@llnl.gov>
Issue #989
  • Loading branch information
dechamps authored and behlendorf committed Oct 3, 2012
1 parent 0aebd4f commit 274091c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/sys/zfs_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 274091c

Please sign in to comment.