aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_file.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-06-28 02:46:47 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-07-14 01:37:37 -0400
commitfbf3ce8d8ec508f6bd99b36de034d2ae3e1ae7ac (patch)
tree5b10e8948c422b85f7e19da711d2b4d5c9b5e244 /fs/xfs/linux-2.6/xfs_file.c
parent16a087d8e1af9b974125870dceb9e4a35249ad1d (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_file.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index 8c43cd2e237a..cbcd40c8c2a0 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -184,15 +184,6 @@ xfs_file_open(
184} 184}
185 185
186STATIC int 186STATIC int
187xfs_file_close(
188 struct file *filp,
189 fl_owner_t id)
190{
191 return -bhv_vop_close(vn_from_inode(filp->f_path.dentry->d_inode), 0,
192 file_count(filp) > 1 ? L_FALSE : L_TRUE, NULL);
193}
194
195STATIC int
196xfs_file_release( 187xfs_file_release(
197 struct inode *inode, 188 struct inode *inode,
198 struct file *filp) 189 struct file *filp)
@@ -436,7 +427,6 @@ const struct file_operations xfs_file_operations = {
436#endif 427#endif
437 .mmap = xfs_file_mmap, 428 .mmap = xfs_file_mmap,
438 .open = xfs_file_open, 429 .open = xfs_file_open,
439 .flush = xfs_file_close,
440 .release = xfs_file_release, 430 .release = xfs_file_release,
441 .fsync = xfs_file_fsync, 431 .fsync = xfs_file_fsync,
442#ifdef HAVE_FOP_OPEN_EXEC 432#ifdef HAVE_FOP_OPEN_EXEC
@@ -458,7 +448,6 @@ const struct file_operations xfs_invis_file_operations = {
458#endif 448#endif
459 .mmap = xfs_file_mmap, 449 .mmap = xfs_file_mmap,
460 .open = xfs_file_open, 450 .open = xfs_file_open,
461 .flush = xfs_file_close,
462 .release = xfs_file_release, 451 .release = xfs_file_release,
463 .fsync = xfs_file_fsync, 452 .fsync = xfs_file_fsync,
464}; 453};