]> Pileus Git - ~andy/linux/blobdiff - fs/ext3/file.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[~andy/linux] / fs / ext3 / file.c
index 388bbdfa0b4e0b7e2d6f47ddc3b5665722066895..f55df0e61cbded50f25db7dc094c0ffc5a8dc7a3 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,