summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorMingming <cmm@us.ibm.com>2008-05-27 10:55:43 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:03 -0400
commite1b81e6761bd8419146d4bbe0aadd8b2d348a01c (patch)
treea21c101b1dddf5acfd26dc8cd09570acb193b25e /fs/btrfs/file.c
parentda496f2acf61153e0d4d42ded6a53f3367939db0 (diff)
btrfs delete ordered inode handling fix
Use btrfs_release_file instead of a put_inode call Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index d968900c697..c4fa4664a45 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -978,6 +978,12 @@ out_nolock:
return num_written ? num_written : err;
}
+static int btrfs_release_file (struct inode * inode, struct file * filp)
+{
+ btrfs_del_ordered_inode(inode);
+ return 0;
+}
+
static int btrfs_sync_file(struct file *file,
struct dentry *dentry, int datasync)
{
@@ -1044,6 +1050,7 @@ struct file_operations btrfs_file_operations = {
.write = btrfs_file_write,
.mmap = btrfs_file_mmap,
.open = generic_file_open,
+ .release = btrfs_release_file,
.fsync = btrfs_sync_file,
.unlocked_ioctl = btrfs_ioctl,
#ifdef CONFIG_COMPAT