Skip to content
Snippets Groups Projects
Commit 977ecf04 authored by Johann Lombardi's avatar Johann Lombardi
Browse files

Branch b1_6

use PF_SYNCWRITE only with kernels having this flag

attachment 10735
b=11039
i=adilger
i=shadow
parent efb7eba7
No related branches found
No related tags found
No related merge requests found
......@@ -409,11 +409,15 @@ static int filter_sync_inode_data(struct inode *inode, int locked)
if (!locked)
LOCK_INODE_MUTEX(inode);
if (inode->i_mapping->nrpages) {
#ifdef PF_SYNCWRITE
current->flags |= PF_SYNCWRITE;
#endif
rc = filemap_fdatawrite(inode->i_mapping);
if (rc == 0)
rc = filemap_fdatawait(inode->i_mapping);
#ifdef PF_SYNCWRITE
current->flags &= ~PF_SYNCWRITE;
#endif
}
if (!locked)
UNLOCK_INODE_MUTEX(inode);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment