diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/hfsplus/options.c | 2 | ||||
| -rw-r--r-- | fs/ocfs2/quota_global.c | 27 | ||||
| -rw-r--r-- | fs/ocfs2/quota_local.c | 4 | ||||
| -rw-r--r-- | fs/proc/page.c | 5 |
4 files changed, 20 insertions, 18 deletions
diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c index 968eab5bc1f5..68537e8b7a09 100644 --- a/fs/hfsplus/options.c +++ b/fs/hfsplus/options.c | |||
| @@ -75,7 +75,7 @@ int hfsplus_parse_options_remount(char *input, int *force) | |||
| 75 | int token; | 75 | int token; |
| 76 | 76 | ||
| 77 | if (!input) | 77 | if (!input) |
| 78 | return 0; | 78 | return 1; |
| 79 | 79 | ||
| 80 | while ((p = strsep(&input, ",")) != NULL) { | 80 | while ((p = strsep(&input, ",")) != NULL) { |
| 81 | if (!*p) | 81 | if (!*p) |
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index aaa50611ec66..d7b5108789e2 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c | |||
| @@ -717,6 +717,12 @@ static int ocfs2_release_dquot(struct dquot *dquot) | |||
| 717 | */ | 717 | */ |
| 718 | if (status < 0) | 718 | if (status < 0) |
| 719 | mlog_errno(status); | 719 | mlog_errno(status); |
| 720 | /* | ||
| 721 | * Clear dq_off so that we search for the structure in quota file next | ||
| 722 | * time we acquire it. The structure might be deleted and reallocated | ||
| 723 | * elsewhere by another node while our dquot structure is on freelist. | ||
| 724 | */ | ||
| 725 | dquot->dq_off = 0; | ||
| 720 | clear_bit(DQ_ACTIVE_B, &dquot->dq_flags); | 726 | clear_bit(DQ_ACTIVE_B, &dquot->dq_flags); |
| 721 | out_trans: | 727 | out_trans: |
| 722 | ocfs2_commit_trans(osb, handle); | 728 | ocfs2_commit_trans(osb, handle); |
| @@ -756,16 +762,17 @@ static int ocfs2_acquire_dquot(struct dquot *dquot) | |||
| 756 | status = ocfs2_lock_global_qf(info, 1); | 762 | status = ocfs2_lock_global_qf(info, 1); |
| 757 | if (status < 0) | 763 | if (status < 0) |
| 758 | goto out; | 764 | goto out; |
| 759 | if (!test_bit(DQ_READ_B, &dquot->dq_flags)) { | 765 | status = ocfs2_qinfo_lock(info, 0); |
| 760 | status = ocfs2_qinfo_lock(info, 0); | 766 | if (status < 0) |
| 761 | if (status < 0) | 767 | goto out_dq; |
| 762 | goto out_dq; | 768 | /* |
| 763 | status = qtree_read_dquot(&info->dqi_gi, dquot); | 769 | * We always want to read dquot structure from disk because we don't |
| 764 | ocfs2_qinfo_unlock(info, 0); | 770 | * know what happened with it while it was on freelist. |
| 765 | if (status < 0) | 771 | */ |
| 766 | goto out_dq; | 772 | status = qtree_read_dquot(&info->dqi_gi, dquot); |
| 767 | } | 773 | ocfs2_qinfo_unlock(info, 0); |
| 768 | set_bit(DQ_READ_B, &dquot->dq_flags); | 774 | if (status < 0) |
| 775 | goto out_dq; | ||
| 769 | 776 | ||
| 770 | OCFS2_DQUOT(dquot)->dq_use_count++; | 777 | OCFS2_DQUOT(dquot)->dq_use_count++; |
| 771 | OCFS2_DQUOT(dquot)->dq_origspace = dquot->dq_dqb.dqb_curspace; | 778 | OCFS2_DQUOT(dquot)->dq_origspace = dquot->dq_dqb.dqb_curspace; |
diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c index 2e4344be3b96..2001862bf2b1 100644 --- a/fs/ocfs2/quota_local.c +++ b/fs/ocfs2/quota_local.c | |||
| @@ -1303,10 +1303,6 @@ int ocfs2_local_release_dquot(handle_t *handle, struct dquot *dquot) | |||
| 1303 | ocfs2_journal_dirty(handle, od->dq_chunk->qc_headerbh); | 1303 | ocfs2_journal_dirty(handle, od->dq_chunk->qc_headerbh); |
| 1304 | 1304 | ||
| 1305 | out: | 1305 | out: |
| 1306 | /* Clear the read bit so that next time someone uses this | ||
| 1307 | * dquot he reads fresh info from disk and allocates local | ||
| 1308 | * dquot structure */ | ||
| 1309 | clear_bit(DQ_READ_B, &dquot->dq_flags); | ||
| 1310 | return status; | 1306 | return status; |
| 1311 | } | 1307 | } |
| 1312 | 1308 | ||
diff --git a/fs/proc/page.c b/fs/proc/page.c index 02174a610315..e647c55275d9 100644 --- a/fs/proc/page.c +++ b/fs/proc/page.c | |||
| @@ -121,9 +121,8 @@ u64 stable_page_flags(struct page *page) | |||
| 121 | * just checks PG_head/PG_tail, so we need to check PageLRU/PageAnon | 121 | * just checks PG_head/PG_tail, so we need to check PageLRU/PageAnon |
| 122 | * to make sure a given page is a thp, not a non-huge compound page. | 122 | * to make sure a given page is a thp, not a non-huge compound page. |
| 123 | */ | 123 | */ |
| 124 | else if (PageTransCompound(page) && | 124 | else if (PageTransCompound(page) && (PageLRU(compound_head(page)) || |
| 125 | (PageLRU(compound_trans_head(page)) || | 125 | PageAnon(compound_head(page)))) |
| 126 | PageAnon(compound_trans_head(page)))) | ||
| 127 | u |= 1 << KPF_THP; | 126 | u |= 1 << KPF_THP; |
| 128 | 127 | ||
| 129 | /* | 128 | /* |
