lead to certain inconsistencies when accessing it using non-atomic
bit operations like __set_bit in do_set_dqblk.
+Severity : normal
+Bugzilla : 22360
+Description: return any pending async errors in close(2) using flush callback
+
-------------------------------------------------------------------------------
2010-01-29 Sun Microsystems, Inc.
RETURN(retval);
}
+int ll_flush(struct file *file, fl_owner_t id)
+{
+ struct inode *inode = file->f_dentry->d_inode;
+ struct ll_inode_info *lli = ll_i2info(inode);
+ struct lov_stripe_md *lsm = lli->lli_smd;
+ int rc, err;
+
+ /* catch async errors that were recorded back when async writeback
+ * failed for pages in this mapping. */
+ rc = lli->lli_async_rc;
+ lli->lli_async_rc = 0;
+ if (lsm) {
+ err = lov_test_and_clear_async_rc(lsm);
+ if (rc == 0)
+ rc = err;
+ }
+
+ return rc;
+}
+
int ll_fsync(struct file *file, struct dentry *dentry, int data)
{
struct inode *inode = dentry->d_inode;
.sendfile = ll_file_sendfile,
#endif
.fsync = ll_fsync,
+ .flush = ll_flush
};
struct file_operations ll_file_operations_flock = {
.sendfile = ll_file_sendfile,
#endif
.fsync = ll_fsync,
+ .flush = ll_flush,
#ifdef HAVE_F_OP_FLOCK
.flock = ll_file_flock,
#endif
.sendfile = ll_file_sendfile,
#endif
.fsync = ll_fsync,
+ .flush = ll_flush,
#ifdef HAVE_F_OP_FLOCK
.flock = ll_file_noflock,
#endif