Home Home > GIT Browse > vanilla
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-06-29 10:39:08 +1000
committerNeilBrown <neilb@suse.de>2010-06-29 10:39:08 +1000
commitccefa2ca7f13547180c62592bc9e8dddbc6f4b2e (patch)
tree32406117248c4b0778fc0c82cb563d0776e80b89
parent07382b857ec9bb3c332335646c918b47464d4c29 (diff)
- patches.fixes/nfs_wb_page_deadlock.fix: NFS: Fix anotherrpm-2.6.34-12
nfs_wb_page() deadlock (bnc#612794). suse-commit: 7a744773dd7c2539b7757435d0108cb701dd0165
-rw-r--r--fs/nfs/write.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index e8748ec2db8e..d1113cefce49 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1582,14 +1582,17 @@ int nfs_wb_page(struct inode *inode, struct page *page)
};
int ret;
- while(PagePrivate(page)) {
+ for (;;) {
wait_on_page_writeback(page);
if (clear_page_dirty_for_io(page)) {
ret = nfs_writepage_locked(page, &wbc);
if (ret < 0)
goto out_error;
+ continue;
}
- ret = sync_inode(inode, &wbc);
+ if (!PagePrivate(page))
+ break;
+ ret = nfs_commit_inode(inode, FLUSH_SYNC);
if (ret < 0)
goto out_error;
}