diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index ce0cd29efa9eb4d8e917b312a84da6a2feb5d62d..7f29464c0ebf53cc338ab26145f4984d5b7bfb7d 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1139,7 +1139,7 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync)
 	/*
 	 * ok we haven't committed the transaction yet, lets do a commit
 	 */
-	if (file && file->private_data)
+	if (file->private_data)
 		btrfs_ioctl_trans_end(file);
 
 	trans = btrfs_start_transaction(root, 0);