diff options
Diffstat (limited to 'fs/gfs2/file.c')
-rw-r--r-- | fs/gfs2/file.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 07959150d44e..8ffeb031248e 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c | |||
@@ -370,11 +370,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
370 | loff_t size; | 370 | loff_t size; |
371 | int ret; | 371 | int ret; |
372 | 372 | ||
373 | /* Wait if fs is frozen. This is racy so we check again later on | 373 | sb_start_pagefault(inode->i_sb); |
374 | * and retry if the fs has been frozen after the page lock has | ||
375 | * been acquired | ||
376 | */ | ||
377 | vfs_check_frozen(inode->i_sb, SB_FREEZE_WRITE); | ||
378 | 374 | ||
379 | /* Update file times before taking page lock */ | 375 | /* Update file times before taking page lock */ |
380 | file_update_time(vma->vm_file); | 376 | file_update_time(vma->vm_file); |
@@ -458,14 +454,9 @@ out: | |||
458 | gfs2_holder_uninit(&gh); | 454 | gfs2_holder_uninit(&gh); |
459 | if (ret == 0) { | 455 | if (ret == 0) { |
460 | set_page_dirty(page); | 456 | set_page_dirty(page); |
461 | /* This check must be post dropping of transaction lock */ | 457 | wait_on_page_writeback(page); |
462 | if (inode->i_sb->s_frozen == SB_UNFROZEN) { | ||
463 | wait_on_page_writeback(page); | ||
464 | } else { | ||
465 | ret = -EAGAIN; | ||
466 | unlock_page(page); | ||
467 | } | ||
468 | } | 458 | } |
459 | sb_end_pagefault(inode->i_sb); | ||
469 | return block_page_mkwrite_return(ret); | 460 | return block_page_mkwrite_return(ret); |
470 | } | 461 | } |
471 | 462 | ||