Skip to content

Commit

Permalink
switch ufs to simple_fsync()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Jun 12, 2009
1 parent 05459ca commit a932801
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion fs/ufs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,6 @@ int ufs_empty_dir(struct inode * inode)
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,
};
23 changes: 1 addition & 22 deletions fs/ufs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,10 @@
*/

#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.
Expand All @@ -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,
};
1 change: 0 additions & 1 deletion fs/ufs/ufs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a932801

Please sign in to comment.