diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-04-14 02:50:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-04-14 02:51:07 -0400 |
commit | a4c98f8bbeafee12c979c90743f6fda94f7515c7 (patch) | |
tree | 3dda24b8a2ec42ab7b42845cb68c8b6e1b0d501f /fs/nfs/write.c | |
parent | f4ad9bd208c98f32a6f9136618e0b8bebe3fb370 (diff) | |
parent | 85f2e689a5c8fb6ed8fdbee00109e7f6e5fefcb6 (diff) |
Merge branch 'linus' into sched/locking
Merge reason: Pick up this upstream commit:
6631e635c65d: block: don't flush plugged IO on forced preemtion scheduling
As it modifies the scheduler and we'll queue up dependent patches.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/nfs/write.c')
-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 af0c6279a4a7..e4cbc11a74ab 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -542,11 +542,15 @@ nfs_scan_commit(struct inode *inode, struct list_head *dst, pgoff_t idx_start, u | |||
542 | if (!nfs_need_commit(nfsi)) | 542 | if (!nfs_need_commit(nfsi)) |
543 | return 0; | 543 | return 0; |
544 | 544 | ||
545 | spin_lock(&inode->i_lock); | ||
545 | ret = nfs_scan_list(nfsi, dst, idx_start, npages, NFS_PAGE_TAG_COMMIT); | 546 | ret = nfs_scan_list(nfsi, dst, idx_start, npages, NFS_PAGE_TAG_COMMIT); |
546 | if (ret > 0) | 547 | if (ret > 0) |
547 | nfsi->ncommit -= ret; | 548 | nfsi->ncommit -= ret; |
549 | spin_unlock(&inode->i_lock); | ||
550 | |||
548 | if (nfs_need_commit(NFS_I(inode))) | 551 | if (nfs_need_commit(NFS_I(inode))) |
549 | __mark_inode_dirty(inode, I_DIRTY_DATASYNC); | 552 | __mark_inode_dirty(inode, I_DIRTY_DATASYNC); |
553 | |||
550 | return ret; | 554 | return ret; |
551 | } | 555 | } |
552 | #else | 556 | #else |
@@ -1483,9 +1487,7 @@ int nfs_commit_inode(struct inode *inode, int how) | |||
1483 | res = nfs_commit_set_lock(NFS_I(inode), may_wait); | 1487 | res = nfs_commit_set_lock(NFS_I(inode), may_wait); |
1484 | if (res <= 0) | 1488 | if (res <= 0) |
1485 | goto out_mark_dirty; | 1489 | goto out_mark_dirty; |
1486 | spin_lock(&inode->i_lock); | ||
1487 | res = nfs_scan_commit(inode, &head, 0, 0); | 1490 | res = nfs_scan_commit(inode, &head, 0, 0); |
1488 | spin_unlock(&inode->i_lock); | ||
1489 | if (res) { | 1491 | if (res) { |
1490 | int error; | 1492 | int error; |
1491 | 1493 | ||