diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-29 05:49:07 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-06-11 15:57:40 -0400 |
commit | 6f902af400b2499c80865c62a06fbbd15cf804fd (patch) | |
tree | 9bd7ee1dd243b5513ebad74b2870950a6d427d3c /fs/btrfs | |
parent | 834e74759a473f8101a273e843d1edec2778801d (diff) |
Btrfs: The file argument for fsync() is never null
The "file" argument for fsync is never null so we can remove this check.
What drew my attention here is that 7ea8085910e: "drop unused dentry
argument to ->fsync" introduced an unconditional dereference at the
start of the function and that generated a smatch warning.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index ce0cd29efa9e..7f29464c0ebf 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) | |||
1139 | /* | 1139 | /* |
1140 | * ok we haven't committed the transaction yet, lets do a commit | 1140 | * ok we haven't committed the transaction yet, lets do a commit |
1141 | */ | 1141 | */ |
1142 | if (file && file->private_data) | 1142 | if (file->private_data) |
1143 | btrfs_ioctl_trans_end(file); | 1143 | btrfs_ioctl_trans_end(file); |
1144 | 1144 | ||
1145 | trans = btrfs_start_transaction(root, 0); | 1145 | trans = btrfs_start_transaction(root, 0); |