diff options
-rw-r--r-- | fs/nfs/write.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 29d88209199d..9b8eb9373ad4 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -1525,9 +1525,10 @@ int nfs_sync_inode_wait(struct inode *inode, unsigned long idx_start, | |||
1525 | pages = nfs_scan_dirty(inode, &head, idx_start, npages); | 1525 | pages = nfs_scan_dirty(inode, &head, idx_start, npages); |
1526 | if (pages != 0) { | 1526 | if (pages != 0) { |
1527 | spin_unlock(&nfsi->req_lock); | 1527 | spin_unlock(&nfsi->req_lock); |
1528 | if (how & FLUSH_INVALIDATE) | 1528 | if (how & FLUSH_INVALIDATE) { |
1529 | nfs_cancel_dirty_list(&head); | 1529 | nfs_cancel_dirty_list(&head); |
1530 | else | 1530 | ret = pages; |
1531 | } else | ||
1531 | ret = nfs_flush_list(inode, &head, pages, how); | 1532 | ret = nfs_flush_list(inode, &head, pages, how); |
1532 | spin_lock(&nfsi->req_lock); | 1533 | spin_lock(&nfsi->req_lock); |
1533 | continue; | 1534 | continue; |
@@ -1540,6 +1541,7 @@ int nfs_sync_inode_wait(struct inode *inode, unsigned long idx_start, | |||
1540 | if (how & FLUSH_INVALIDATE) { | 1541 | if (how & FLUSH_INVALIDATE) { |
1541 | spin_unlock(&nfsi->req_lock); | 1542 | spin_unlock(&nfsi->req_lock); |
1542 | nfs_cancel_commit_list(&head); | 1543 | nfs_cancel_commit_list(&head); |
1544 | ret = pages; | ||
1543 | spin_lock(&nfsi->req_lock); | 1545 | spin_lock(&nfsi->req_lock); |
1544 | continue; | 1546 | continue; |
1545 | } | 1547 | } |