Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29684
b: refs/heads/master
c: 577a827
h: refs/heads/master
v: v3
  • Loading branch information
Evgeniy Dushistov authored and Linus Torvalds committed Jun 25, 2006
1 parent 0caed90 commit 9be27af
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 647b7e87b56f594daf648f44abfbeeb5eb6a9457
refs/heads/master: 577a82752f95a5680d7c14569ffd3fd630d9fb22
21 changes: 21 additions & 0 deletions trunk/fs/ufs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,26 @@

#include <linux/fs.h>
#include <linux/ufs_fs.h>
#include <linux/buffer_head.h> /* for sync_mapping_buffers() */

static 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
Expand All @@ -37,6 +57,7 @@ const struct file_operations ufs_file_operations = {
.write = generic_file_write,
.mmap = generic_file_mmap,
.open = generic_file_open,
.fsync = ufs_sync_file,
.sendfile = generic_file_sendfile,
};

Expand Down

0 comments on commit 9be27af

Please sign in to comment.