Before this patch, whenever a struct file (opened to allow writes) was closed, the multi-block reservation structure associated with the inode was deleted. That's a problem, especially when there are multiple writers. Applications that do open-write-close will suffer from greater levels of fragmentation and need to re-do work to perform write operations. This patch removes the reservation delete from the file close code so that they're more persistent until the inode is deleted. --- fs/gfs2/file.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 7f4ed3d..2976019 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -616,15 +616,8 @@ static int gfs2_open(struct inode *inode, struct file *file) static int gfs2_release(struct inode *inode, struct file *file) { - struct gfs2_inode *ip = GFS2_I(inode); - kfree(file->private_data); file->private_data = NULL; - - if (!(file->f_mode & FMODE_WRITE)) - return 0; - - gfs2_rs_delete(ip, &inode->i_writecount); return 0; } -- 1.9.3