aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_address.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/ops_address.c')
-rw-r--r--fs/gfs2/ops_address.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index 56e33590b656..b3b7e8475359 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -266,9 +266,11 @@ skip_lock:
266out: 266out:
267 return error; 267 return error;
268out_unlock: 268out_unlock:
269 if (error == GLR_TRYFAILED)
270 error = AOP_TRUNCATED_PAGE;
271 unlock_page(page); 269 unlock_page(page);
270 if (error == GLR_TRYFAILED) {
271 error = AOP_TRUNCATED_PAGE;
272 yield();
273 }
272 if (do_unlock) 274 if (do_unlock)
273 gfs2_holder_uninit(&gh); 275 gfs2_holder_uninit(&gh);
274 goto out; 276 goto out;
@@ -364,6 +366,7 @@ static int gfs2_prepare_write(struct file *file, struct page *page,
364 if (error == GLR_TRYFAILED) { 366 if (error == GLR_TRYFAILED) {
365 unlock_page(page); 367 unlock_page(page);
366 error = AOP_TRUNCATED_PAGE; 368 error = AOP_TRUNCATED_PAGE;
369 yield();
367 } 370 }
368 goto out_uninit; 371 goto out_uninit;
369 } 372 }