X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fext3%2Ffile.c;h=5b49704b231b27b53a8d52dc15a1c62118f6124f;hb=20bec8ab1458c24bed0d5492ee15d87807fc415a;hp=521f8238b2fa1e967b47040355e5834fe3fc3e53;hpb=223cdea4c4b5af5181b2da00ac85711d1e0c737c;p=linux-2.6-omap-h63xx.git diff --git a/fs/ext3/file.c b/fs/ext3/file.c index 521f8238b2f..5b49704b231 100644 --- a/fs/ext3/file.c +++ b/fs/ext3/file.c @@ -33,6 +33,10 @@ */ static int ext3_release_file (struct inode * inode, struct file * filp) { + if (EXT3_I(inode)->i_state & EXT3_STATE_FLUSH_ON_CLOSE) { + filemap_flush(inode->i_mapping); + EXT3_I(inode)->i_state &= ~EXT3_STATE_FLUSH_ON_CLOSE; + } /* if we are the last writer on the inode, drop the block reservation */ if ((filp->f_mode & FMODE_WRITE) && (atomic_read(&inode->i_writecount) == 1))