Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
[cascardo/linux.git] / fs / ext3 / file.c
index 388bbdf..f55df0e 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/time.h>
 #include <linux/fs.h>
 #include <linux/jbd.h>
+#include <linux/quotaops.h>
 #include <linux/ext3_fs.h>
 #include <linux/ext3_jbd.h>
 #include "xattr.h"
@@ -33,9 +34,9 @@
  */
 static int ext3_release_file (struct inode * inode, struct file * filp)
 {
-       if (EXT3_I(inode)->i_state & EXT3_STATE_FLUSH_ON_CLOSE) {
+       if (ext3_test_inode_state(inode, EXT3_STATE_FLUSH_ON_CLOSE)) {
                filemap_flush(inode->i_mapping);
-               EXT3_I(inode)->i_state &= ~EXT3_STATE_FLUSH_ON_CLOSE;
+               ext3_clear_inode_state(inode, EXT3_STATE_FLUSH_ON_CLOSE);
        }
        /* if we are the last writer on the inode, drop the block reservation */
        if ((filp->f_mode & FMODE_WRITE) &&
@@ -62,7 +63,7 @@ const struct file_operations ext3_file_operations = {
        .compat_ioctl   = ext3_compat_ioctl,
 #endif
        .mmap           = generic_file_mmap,
-       .open           = generic_file_open,
+       .open           = dquot_file_open,
        .release        = ext3_release_file,
        .fsync          = ext3_sync_file,
        .splice_read    = generic_file_splice_read,