diff options
Diffstat (limited to 'fs/jbd2/commit.c')
| -rw-r--r-- | fs/jbd2/commit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 2ad98d6e19f4..70078096117d 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
| @@ -219,6 +219,8 @@ static int journal_submit_data_buffers(journal_t *journal, | |||
| 219 | 219 | ||
| 220 | spin_lock(&journal->j_list_lock); | 220 | spin_lock(&journal->j_list_lock); |
| 221 | list_for_each_entry(jinode, &commit_transaction->t_inode_list, i_list) { | 221 | list_for_each_entry(jinode, &commit_transaction->t_inode_list, i_list) { |
| 222 | if (!(jinode->i_flags & JI_WRITE_DATA)) | ||
| 223 | continue; | ||
| 222 | mapping = jinode->i_vfs_inode->i_mapping; | 224 | mapping = jinode->i_vfs_inode->i_mapping; |
| 223 | jinode->i_flags |= JI_COMMIT_RUNNING; | 225 | jinode->i_flags |= JI_COMMIT_RUNNING; |
| 224 | spin_unlock(&journal->j_list_lock); | 226 | spin_unlock(&journal->j_list_lock); |
| @@ -256,6 +258,8 @@ static int journal_finish_inode_data_buffers(journal_t *journal, | |||
| 256 | /* For locking, see the comment in journal_submit_data_buffers() */ | 258 | /* For locking, see the comment in journal_submit_data_buffers() */ |
| 257 | spin_lock(&journal->j_list_lock); | 259 | spin_lock(&journal->j_list_lock); |
| 258 | list_for_each_entry(jinode, &commit_transaction->t_inode_list, i_list) { | 260 | list_for_each_entry(jinode, &commit_transaction->t_inode_list, i_list) { |
| 261 | if (!(jinode->i_flags & JI_WAIT_DATA)) | ||
| 262 | continue; | ||
| 259 | jinode->i_flags |= JI_COMMIT_RUNNING; | 263 | jinode->i_flags |= JI_COMMIT_RUNNING; |
| 260 | spin_unlock(&journal->j_list_lock); | 264 | spin_unlock(&journal->j_list_lock); |
| 261 | err = filemap_fdatawait(jinode->i_vfs_inode->i_mapping); | 265 | err = filemap_fdatawait(jinode->i_vfs_inode->i_mapping); |
