aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/gfs2/Kconfig2
-rw-r--r--fs/gfs2/lops.c2
-rw-r--r--fs/gfs2/quota.c4
-rw-r--r--fs/gfs2/rgrp.c9
4 files changed, 11 insertions, 6 deletions
diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig
index eb08c9e43c2a..5a376ab81feb 100644
--- a/fs/gfs2/Kconfig
+++ b/fs/gfs2/Kconfig
@@ -26,7 +26,7 @@ config GFS2_FS
26config GFS2_FS_LOCKING_DLM 26config GFS2_FS_LOCKING_DLM
27 bool "GFS2 DLM locking" 27 bool "GFS2 DLM locking"
28 depends on (GFS2_FS!=n) && NET && INET && (IPV6 || IPV6=n) && \ 28 depends on (GFS2_FS!=n) && NET && INET && (IPV6 || IPV6=n) && \
29 HOTPLUG && DLM && CONFIGFS_FS && SYSFS 29 HOTPLUG && CONFIGFS_FS && SYSFS && (DLM=y || DLM=GFS2_FS)
30 help 30 help
31 Multiple node locking module for GFS2 31 Multiple node locking module for GFS2
32 32
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index c5fa758fd844..68b4c8f1fce8 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -212,7 +212,7 @@ static void gfs2_end_log_write(struct bio *bio, int error)
212 fs_err(sdp, "Error %d writing to log\n", error); 212 fs_err(sdp, "Error %d writing to log\n", error);
213 } 213 }
214 214
215 bio_for_each_segment(bvec, bio, i) { 215 bio_for_each_segment_all(bvec, bio, i) {
216 page = bvec->bv_page; 216 page = bvec->bv_page;
217 if (page_has_buffers(page)) 217 if (page_has_buffers(page))
218 gfs2_end_log_write_bh(sdp, bvec, error); 218 gfs2_end_log_write_bh(sdp, bvec, error);
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index c7c840e916f8..c253b13722e8 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -121,7 +121,7 @@ static u64 qd2index(struct gfs2_quota_data *qd)
121{ 121{
122 struct kqid qid = qd->qd_id; 122 struct kqid qid = qd->qd_id;
123 return (2 * (u64)from_kqid(&init_user_ns, qid)) + 123 return (2 * (u64)from_kqid(&init_user_ns, qid)) +
124 (qid.type == USRQUOTA) ? 0 : 1; 124 ((qid.type == USRQUOTA) ? 0 : 1);
125} 125}
126 126
127static u64 qd2offset(struct gfs2_quota_data *qd) 127static u64 qd2offset(struct gfs2_quota_data *qd)
@@ -721,7 +721,7 @@ get_a_page:
721 goto unlock_out; 721 goto unlock_out;
722 } 722 }
723 723
724 gfs2_trans_add_meta(ip->i_gl, bh); 724 gfs2_trans_add_data(ip->i_gl, bh);
725 725
726 kaddr = kmap_atomic(page); 726 kaddr = kmap_atomic(page);
727 if (offset + sizeof(struct gfs2_quota) > PAGE_CACHE_SIZE) 727 if (offset + sizeof(struct gfs2_quota) > PAGE_CACHE_SIZE)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 0c5a575b513e..5232525934ae 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1401,9 +1401,14 @@ static void rg_mblk_search(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip,
1401 u32 extlen; 1401 u32 extlen;
1402 u32 free_blocks = rgd->rd_free_clone - rgd->rd_reserved; 1402 u32 free_blocks = rgd->rd_free_clone - rgd->rd_reserved;
1403 int ret; 1403 int ret;
1404 struct inode *inode = &ip->i_inode;
1404 1405
1405 extlen = max_t(u32, atomic_read(&rs->rs_sizehint), requested); 1406 if (S_ISDIR(inode->i_mode))
1406 extlen = clamp(extlen, RGRP_RSRV_MINBLKS, free_blocks); 1407 extlen = 1;
1408 else {
1409 extlen = max_t(u32, atomic_read(&rs->rs_sizehint), requested);
1410 extlen = clamp(extlen, RGRP_RSRV_MINBLKS, free_blocks);
1411 }
1407 if ((rgd->rd_free_clone < rgd->rd_reserved) || (free_blocks < extlen)) 1412 if ((rgd->rd_free_clone < rgd->rd_reserved) || (free_blocks < extlen))
1408 return; 1413 return;
1409 1414