diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-06-28 02:46:47 -0400 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-07-14 01:37:37 -0400 |
commit | fbf3ce8d8ec508f6bd99b36de034d2ae3e1ae7ac (patch) | |
tree | 5b10e8948c422b85f7e19da711d2b4d5c9b5e244 /fs/xfs/linux-2.6/xfs_vnode.h | |
parent | 16a087d8e1af9b974125870dceb9e4a35249ad1d (diff) |
[XFS] XFS should not be looking at filp reference counts
A check for file_count is always a bad idea. Linux has the ->release
method to deal with cleanups on last close and ->flush is only for the
very rare case where we want to perform an operation on every drop of a
reference to a file struct.
This patch gets rid of vop_close and surrounding code in favour of simply
doing the page flushing from ->release.
SGI-PV: 966562
SGI-Modid: xfs-linux-melb:xfs-kern:28952a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vnode.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index 013048a92643..5742d65f0785 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h | |||
@@ -129,10 +129,7 @@ typedef enum bhv_vchange { | |||
129 | VCHANGE_FLAGS_IOEXCL_COUNT = 4 | 129 | VCHANGE_FLAGS_IOEXCL_COUNT = 4 |
130 | } bhv_vchange_t; | 130 | } bhv_vchange_t; |
131 | 131 | ||
132 | typedef enum { L_FALSE, L_TRUE } lastclose_t; | ||
133 | |||
134 | typedef int (*vop_open_t)(bhv_desc_t *, struct cred *); | 132 | typedef int (*vop_open_t)(bhv_desc_t *, struct cred *); |
135 | typedef int (*vop_close_t)(bhv_desc_t *, int, lastclose_t, struct cred *); | ||
136 | typedef ssize_t (*vop_read_t)(bhv_desc_t *, struct kiocb *, | 133 | typedef ssize_t (*vop_read_t)(bhv_desc_t *, struct kiocb *, |
137 | const struct iovec *, unsigned int, | 134 | const struct iovec *, unsigned int, |
138 | loff_t *, int, struct cred *); | 135 | loff_t *, int, struct cred *); |
@@ -200,7 +197,6 @@ typedef int (*vop_iflush_t)(bhv_desc_t *, int); | |||
200 | typedef struct bhv_vnodeops { | 197 | typedef struct bhv_vnodeops { |
201 | bhv_position_t vn_position; /* position within behavior chain */ | 198 | bhv_position_t vn_position; /* position within behavior chain */ |
202 | vop_open_t vop_open; | 199 | vop_open_t vop_open; |
203 | vop_close_t vop_close; | ||
204 | vop_read_t vop_read; | 200 | vop_read_t vop_read; |
205 | vop_write_t vop_write; | 201 | vop_write_t vop_write; |
206 | vop_splice_read_t vop_splice_read; | 202 | vop_splice_read_t vop_splice_read; |
@@ -245,7 +241,6 @@ typedef struct bhv_vnodeops { | |||
245 | #define VNHEAD(vp) ((vp)->v_bh.bh_first) | 241 | #define VNHEAD(vp) ((vp)->v_bh.bh_first) |
246 | #define VOP(op, vp) (*((bhv_vnodeops_t *)VNHEAD(vp)->bd_ops)->op) | 242 | #define VOP(op, vp) (*((bhv_vnodeops_t *)VNHEAD(vp)->bd_ops)->op) |
247 | #define bhv_vop_open(vp, cr) VOP(vop_open, vp)(VNHEAD(vp),cr) | 243 | #define bhv_vop_open(vp, cr) VOP(vop_open, vp)(VNHEAD(vp),cr) |
248 | #define bhv_vop_close(vp, f,last,cr) VOP(vop_close, vp)(VNHEAD(vp),f,last,cr) | ||
249 | #define bhv_vop_read(vp,file,iov,segs,offset,ioflags,cr) \ | 244 | #define bhv_vop_read(vp,file,iov,segs,offset,ioflags,cr) \ |
250 | VOP(vop_read, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr) | 245 | VOP(vop_read, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr) |
251 | #define bhv_vop_write(vp,file,iov,segs,offset,ioflags,cr) \ | 246 | #define bhv_vop_write(vp,file,iov,segs,offset,ioflags,cr) \ |