switch ufs to simple_fsync()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 7 Jun 2009 19:35:18 +0000 (15:35 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 12 Jun 2009 01:36:13 +0000 (21:36 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ufs/dir.c
fs/ufs/file.c
fs/ufs/ufs.h

index 6321b797061b7e4d657f69d604e9e1bcafce0a3f..6f671f1ac27122ee1ae3a9b289958d88f39ac604 100644 (file)
@@ -666,6 +666,6 @@ not_empty:
 const struct file_operations ufs_dir_operations = {
        .read           = generic_read_dir,
        .readdir        = ufs_readdir,
-       .fsync          = ufs_sync_file,
+       .fsync          = simple_fsync,
        .llseek         = generic_file_llseek,
 };
index 2bd3a1615714c6ac18129cc053f287b6fa7d0a8a..73655c61240a0bb756ad4af3d0b841f04c709ae1 100644 (file)
  */
 
 #include <linux/fs.h>
-#include <linux/buffer_head.h> /* for sync_mapping_buffers() */
 
 #include "ufs_fs.h"
 #include "ufs.h"
 
-
-int ufs_sync_file(struct file *file, struct dentry *dentry, int datasync)
-{
-       struct inode *inode = dentry->d_inode;
-       int err;
-       int ret;
-
-       ret = sync_mapping_buffers(inode->i_mapping);
-       if (!(inode->i_state & I_DIRTY))
-               return ret;
-       if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
-               return ret;
-
-       err = ufs_sync_inode(inode);
-       if (ret == 0)
-               ret = err;
-       return ret;
-}
-
-
 /*
  * We have mostly NULL's here: the current defaults are ok for
  * the ufs filesystem.
@@ -62,6 +41,6 @@ const struct file_operations ufs_file_operations = {
        .aio_write      = generic_file_aio_write,
        .mmap           = generic_file_mmap,
        .open           = generic_file_open,
-       .fsync          = ufs_sync_file,
+       .fsync          = simple_fsync,
        .splice_read    = generic_file_splice_read,
 };
index d0c4acd4f1f36f8cf5e17f0e329e111b3e07d79e..644e77e1359912d502bcc05dc50e476b6abe5e68 100644 (file)
@@ -99,7 +99,6 @@ extern void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de,
 extern const struct inode_operations ufs_file_inode_operations;
 extern const struct file_operations ufs_file_operations;
 extern const struct address_space_operations ufs_aops;
-extern int ufs_sync_file(struct file *, struct dentry *, int);
 
 /* ialloc.c */
 extern void ufs_free_inode (struct inode *inode);