aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coda/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/coda/file.c')
-rw-r--r--fs/coda/file.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/coda/file.c b/fs/coda/file.c
index 99dbe866816d..7594962604c2 100644
--- a/fs/coda/file.c
+++ b/fs/coda/file.c
@@ -22,7 +22,6 @@
22#include <linux/coda_linux.h> 22#include <linux/coda_linux.h>
23#include <linux/coda_fs_i.h> 23#include <linux/coda_fs_i.h>
24#include <linux/coda_psdev.h> 24#include <linux/coda_psdev.h>
25#include <linux/coda_proc.h>
26 25
27#include "coda_int.h" 26#include "coda_int.h"
28 27
@@ -134,8 +133,6 @@ int coda_open(struct inode *coda_inode, struct file *coda_file)
134 unsigned short coda_flags = coda_flags_to_cflags(flags); 133 unsigned short coda_flags = coda_flags_to_cflags(flags);
135 struct coda_file_info *cfi; 134 struct coda_file_info *cfi;
136 135
137 coda_vfs_stat.open++;
138
139 cfi = kmalloc(sizeof(struct coda_file_info), GFP_KERNEL); 136 cfi = kmalloc(sizeof(struct coda_file_info), GFP_KERNEL);
140 if (!cfi) 137 if (!cfi)
141 return -ENOMEM; 138 return -ENOMEM;
@@ -143,8 +140,11 @@ int coda_open(struct inode *coda_inode, struct file *coda_file)
143 lock_kernel(); 140 lock_kernel();
144 141
145 error = venus_open(coda_inode->i_sb, coda_i2f(coda_inode), coda_flags, 142 error = venus_open(coda_inode->i_sb, coda_i2f(coda_inode), coda_flags,
146 &host_file); 143 &host_file);
147 if (error || !host_file) { 144 if (!host_file)
145 error = -EIO;
146
147 if (error) {
148 kfree(cfi); 148 kfree(cfi);
149 unlock_kernel(); 149 unlock_kernel();
150 return error; 150 return error;
@@ -173,8 +173,6 @@ int coda_flush(struct file *coda_file, fl_owner_t id)
173 173
174 lock_kernel(); 174 lock_kernel();
175 175
176 coda_vfs_stat.flush++;
177
178 /* last close semantics */ 176 /* last close semantics */
179 fcnt = file_count(coda_file); 177 fcnt = file_count(coda_file);
180 if (fcnt > 1) 178 if (fcnt > 1)
@@ -216,8 +214,7 @@ int coda_release(struct inode *coda_inode, struct file *coda_file)
216 int err = 0; 214 int err = 0;
217 215
218 lock_kernel(); 216 lock_kernel();
219 coda_vfs_stat.release++; 217
220
221 if (!use_coda_close) { 218 if (!use_coda_close) {
222 err = venus_release(coda_inode->i_sb, coda_i2f(coda_inode), 219 err = venus_release(coda_inode->i_sb, coda_i2f(coda_inode),
223 coda_flags); 220 coda_flags);
@@ -268,8 +265,6 @@ int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync)
268 BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); 265 BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC);
269 host_file = cfi->cfi_container; 266 host_file = cfi->cfi_container;
270 267
271 coda_vfs_stat.fsync++;
272
273 if (host_file->f_op && host_file->f_op->fsync) { 268 if (host_file->f_op && host_file->f_op->fsync) {
274 host_dentry = host_file->f_path.dentry; 269 host_dentry = host_file->f_path.dentry;
275 host_inode = host_dentry->d_inode; 270 host_inode = host_dentry->d_inode;