[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>
This commit is contained in:
committed by
Tim Shimmin
parent
16a087d8e1
commit
fbf3ce8d8e
@@ -183,15 +183,6 @@ xfs_file_open(
|
||||
return -bhv_vop_open(vn_from_inode(inode), NULL);
|
||||
}
|
||||
|
||||
STATIC int
|
||||
xfs_file_close(
|
||||
struct file *filp,
|
||||
fl_owner_t id)
|
||||
{
|
||||
return -bhv_vop_close(vn_from_inode(filp->f_path.dentry->d_inode), 0,
|
||||
file_count(filp) > 1 ? L_FALSE : L_TRUE, NULL);
|
||||
}
|
||||
|
||||
STATIC int
|
||||
xfs_file_release(
|
||||
struct inode *inode,
|
||||
@@ -436,7 +427,6 @@ const struct file_operations xfs_file_operations = {
|
||||
#endif
|
||||
.mmap = xfs_file_mmap,
|
||||
.open = xfs_file_open,
|
||||
.flush = xfs_file_close,
|
||||
.release = xfs_file_release,
|
||||
.fsync = xfs_file_fsync,
|
||||
#ifdef HAVE_FOP_OPEN_EXEC
|
||||
@@ -458,7 +448,6 @@ const struct file_operations xfs_invis_file_operations = {
|
||||
#endif
|
||||
.mmap = xfs_file_mmap,
|
||||
.open = xfs_file_open,
|
||||
.flush = xfs_file_close,
|
||||
.release = xfs_file_release,
|
||||
.fsync = xfs_file_fsync,
|
||||
};
|
||||
|
Reference in New Issue
Block a user