diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-05 21:32:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-05 21:32:06 -0500 |
commit | 520c85346666d4d9a6fcaaa8450542302dc28b91 (patch) | |
tree | 9c9cc9e2493b606104dd8602302ae28258ebeac0 /fs/coda/file.c | |
parent | e8c82c2e23e3527e0c9dc195e432c16784d270fa (diff) | |
parent | 4ae8978cf92a96257cd8998a49e781be83571d64 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
inotify: fix type errors in interfaces
fix breakage in reiserfs_new_inode()
fix the treatment of jfs special inodes
vfs: remove duplicate code in get_fs_type()
add a vfs_fsync helper
sys_execve and sys_uselib do not call into fsnotify
zero i_uid/i_gid on inode allocation
inode->i_op is never NULL
ntfs: don't NULL i_op
isofs check for NULL ->i_op in root directory is dead code
affs: do not zero ->i_op
kill suid bit only for regular files
vfs: lseek(fd, 0, SEEK_CUR) race condition
Diffstat (limited to 'fs/coda/file.c')
-rw-r--r-- | fs/coda/file.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/coda/file.c b/fs/coda/file.c index 466303db2df6..6a347fbc998a 100644 --- a/fs/coda/file.c +++ b/fs/coda/file.c | |||
@@ -201,8 +201,7 @@ int coda_release(struct inode *coda_inode, struct file *coda_file) | |||
201 | int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync) | 201 | int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync) |
202 | { | 202 | { |
203 | struct file *host_file; | 203 | struct file *host_file; |
204 | struct dentry *host_dentry; | 204 | struct inode *coda_inode = coda_dentry->d_inode; |
205 | struct inode *host_inode, *coda_inode = coda_dentry->d_inode; | ||
206 | struct coda_file_info *cfi; | 205 | struct coda_file_info *cfi; |
207 | int err = 0; | 206 | int err = 0; |
208 | 207 | ||
@@ -214,14 +213,7 @@ int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync) | |||
214 | BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); | 213 | BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); |
215 | host_file = cfi->cfi_container; | 214 | host_file = cfi->cfi_container; |
216 | 215 | ||
217 | if (host_file->f_op && host_file->f_op->fsync) { | 216 | err = vfs_fsync(host_file, host_file->f_path.dentry, datasync); |
218 | host_dentry = host_file->f_path.dentry; | ||
219 | host_inode = host_dentry->d_inode; | ||
220 | mutex_lock(&host_inode->i_mutex); | ||
221 | err = host_file->f_op->fsync(host_file, host_dentry, datasync); | ||
222 | mutex_unlock(&host_inode->i_mutex); | ||
223 | } | ||
224 | |||
225 | if ( !err && !datasync ) { | 217 | if ( !err && !datasync ) { |
226 | lock_kernel(); | 218 | lock_kernel(); |
227 | err = venus_fsync(coda_inode->i_sb, coda_i2f(coda_inode)); | 219 | err = venus_fsync(coda_inode->i_sb, coda_i2f(coda_inode)); |