aboutsummaryrefslogtreecommitdiff
path: root/fs/exofs/file.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-07-14 00:30:40 +1000
committerJames Morris <jmorris@namei.org>2009-07-14 00:30:40 +1000
commit7d45ecafb6792ca68da9517969d37d910601845f (patch)
treea98b1074e5577e66a97963745f975404d0aac266 /fs/exofs/file.c
parentbe940d6279c30a2d7c4e8d1d5435f957f594d66d (diff)
parent7638d5322bd89d49e013a03fe2afaeb6d214fabd (diff)
Merge branch 'master' into next
Conflicts: include/linux/personality.h Use Linus' version. Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'fs/exofs/file.c')
-rw-r--r--fs/exofs/file.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/fs/exofs/file.c b/fs/exofs/file.c
index 6ed7fe48475..839b9dc1e70 100644
--- a/fs/exofs/file.c
+++ b/fs/exofs/file.c
@@ -1,8 +1,6 @@
/*
* Copyright (C) 2005, 2006
- * Avishay Traeger (avishay@gmail.com) (avishay@il.ibm.com)
- * Copyright (C) 2005, 2006
- * International Business Machines
+ * Avishay Traeger (avishay@gmail.com)
* Copyright (C) 2008, 2009
* Boaz Harrosh <bharrosh@panasas.com>
*
@@ -47,16 +45,23 @@ static int exofs_file_fsync(struct file *filp, struct dentry *dentry,
{
int ret;
struct address_space *mapping = filp->f_mapping;
+ struct inode *inode = dentry->d_inode;
+ struct super_block *sb;
ret = filemap_write_and_wait(mapping);
if (ret)
return ret;
- /*Note: file_fsync below also calles sync_blockdev, which is a no-op
- * for exofs, but other then that it does sync_inode and
- * sync_superblock which is what we need here.
- */
- return file_fsync(filp, dentry, datasync);
+ /* sync the inode attributes */
+ ret = write_inode_now(inode, 1);
+
+ /* This is a good place to write the sb */
+ /* TODO: Sechedule an sb-sync on create */
+ sb = inode->i_sb;
+ if (sb->s_dirt)
+ exofs_sync_fs(sb, 1);
+
+ return ret;
}
static int exofs_flush(struct file *file, fl_owner_t id)