aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/dlm/Kconfig3
-rw-r--r--fs/dlm/lowcomms.c2
-rw-r--r--fs/gfs2/log.c5
-rw-r--r--fs/gfs2/lops.c4
-rw-r--r--fs/gfs2/ops_address.c13
-rw-r--r--fs/gfs2/rgrp.h2
6 files changed, 15 insertions, 14 deletions
diff --git a/fs/dlm/Kconfig b/fs/dlm/Kconfig
index 490f85b3fa59..81b2c6465eeb 100644
--- a/fs/dlm/Kconfig
+++ b/fs/dlm/Kconfig
@@ -1,10 +1,9 @@
1menu "Distributed Lock Manager" 1menu "Distributed Lock Manager"
2 depends on INET && EXPERIMENTAL 2 depends on INET && IP_SCTP && EXPERIMENTAL
3 3
4config DLM 4config DLM
5 tristate "Distributed Lock Manager (DLM)" 5 tristate "Distributed Lock Manager (DLM)"
6 depends on IPV6 || IPV6=n 6 depends on IPV6 || IPV6=n
7 depends on IP_SCTP
8 select CONFIGFS_FS 7 select CONFIGFS_FS
9 help 8 help
10 A general purpose distributed lock manager for kernel or userspace 9 A general purpose distributed lock manager for kernel or userspace
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 7bcea7c5addb..867f93d0417e 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -548,7 +548,7 @@ static int receive_from_sock(void)
548 } 548 }
549 len = iov[0].iov_len + iov[1].iov_len; 549 len = iov[0].iov_len + iov[1].iov_len;
550 550
551 r = ret = kernel_recvmsg(sctp_con.sock, &msg, iov, 1, len, 551 r = ret = kernel_recvmsg(sctp_con.sock, &msg, iov, msg.msg_iovlen, len,
552 MSG_NOSIGNAL | MSG_DONTWAIT); 552 MSG_NOSIGNAL | MSG_DONTWAIT);
553 if (ret <= 0) 553 if (ret <= 0)
554 goto out_close; 554 goto out_close;
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 554fe5bd1b72..72eec6542d6a 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -569,16 +569,15 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl)
569 else if (sdp->sd_log_tail != current_tail(sdp) && !sdp->sd_log_idle) 569 else if (sdp->sd_log_tail != current_tail(sdp) && !sdp->sd_log_idle)
570 log_write_header(sdp, 0, PULL); 570 log_write_header(sdp, 0, PULL);
571 lops_after_commit(sdp, ai); 571 lops_after_commit(sdp, ai);
572 sdp->sd_log_head = sdp->sd_log_flush_head;
573 572
573 gfs2_log_lock(sdp);
574 sdp->sd_log_head = sdp->sd_log_flush_head;
574 sdp->sd_log_blks_free -= sdp->sd_log_num_hdrs; 575 sdp->sd_log_blks_free -= sdp->sd_log_num_hdrs;
575
576 sdp->sd_log_blks_reserved = 0; 576 sdp->sd_log_blks_reserved = 0;
577 sdp->sd_log_commited_buf = 0; 577 sdp->sd_log_commited_buf = 0;
578 sdp->sd_log_num_hdrs = 0; 578 sdp->sd_log_num_hdrs = 0;
579 sdp->sd_log_commited_revoke = 0; 579 sdp->sd_log_commited_revoke = 0;
580 580
581 gfs2_log_lock(sdp);
582 if (!list_empty(&ai->ai_ail1_list)) { 581 if (!list_empty(&ai->ai_ail1_list)) {
583 list_add(&ai->ai_list, &sdp->sd_ail1_list); 582 list_add(&ai->ai_list, &sdp->sd_ail1_list);
584 ai = NULL; 583 ai = NULL;
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 881e337b6a70..ab6d1115f95d 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -492,7 +492,7 @@ static int gfs2_check_magic(struct buffer_head *bh)
492 ptr = kaddr + bh_offset(bh); 492 ptr = kaddr + bh_offset(bh);
493 if (*ptr == cpu_to_be32(GFS2_MAGIC)) 493 if (*ptr == cpu_to_be32(GFS2_MAGIC))
494 rv = 1; 494 rv = 1;
495 kunmap_atomic(page, KM_USER0); 495 kunmap_atomic(kaddr, KM_USER0);
496 496
497 return rv; 497 return rv;
498} 498}
@@ -626,7 +626,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp)
626 memcpy(bh->b_data, 626 memcpy(bh->b_data,
627 kaddr + bh_offset(bd2->bd_bh), 627 kaddr + bh_offset(bd2->bd_bh),
628 sdp->sd_sb.sb_bsize); 628 sdp->sd_sb.sb_bsize);
629 kunmap_atomic(page, KM_USER0); 629 kunmap_atomic(kaddr, KM_USER0);
630 *(__be32 *)bh->b_data = 0; 630 *(__be32 *)bh->b_data = 0;
631 } else { 631 } else {
632 bh = gfs2_log_fake_buf(sdp, bd2->bd_bh); 632 bh = gfs2_log_fake_buf(sdp, bd2->bd_bh);
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index 4fb743f4e4a4..e0599fed99ce 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -162,7 +162,7 @@ static int zero_readpage(struct page *page)
162 162
163 kaddr = kmap_atomic(page, KM_USER0); 163 kaddr = kmap_atomic(page, KM_USER0);
164 memset(kaddr, 0, PAGE_CACHE_SIZE); 164 memset(kaddr, 0, PAGE_CACHE_SIZE);
165 kunmap_atomic(page, KM_USER0); 165 kunmap_atomic(kaddr, KM_USER0);
166 166
167 SetPageUptodate(page); 167 SetPageUptodate(page);
168 168
@@ -195,7 +195,7 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page)
195 memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), 195 memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode),
196 ip->i_di.di_size); 196 ip->i_di.di_size);
197 memset(kaddr + ip->i_di.di_size, 0, PAGE_CACHE_SIZE - ip->i_di.di_size); 197 memset(kaddr + ip->i_di.di_size, 0, PAGE_CACHE_SIZE - ip->i_di.di_size);
198 kunmap_atomic(page, KM_USER0); 198 kunmap_atomic(kaddr, KM_USER0);
199 199
200 brelse(dibh); 200 brelse(dibh);
201 201
@@ -370,19 +370,22 @@ static int gfs2_prepare_write(struct file *file, struct page *page,
370 loff_t pos = ((loff_t)page->index << PAGE_CACHE_SHIFT) + from; 370 loff_t pos = ((loff_t)page->index << PAGE_CACHE_SHIFT) + from;
371 loff_t end = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to; 371 loff_t end = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to;
372 struct gfs2_alloc *al; 372 struct gfs2_alloc *al;
373 unsigned int write_len = to - from;
374
373 375
374 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_ATIME|GL_AOP, &ip->i_gh); 376 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_ATIME|GL_AOP, &ip->i_gh);
375 error = gfs2_glock_nq_m_atime(1, &ip->i_gh); 377 error = gfs2_glock_nq_m_atime(1, &ip->i_gh);
376 if (error) 378 if (error)
377 goto out_uninit; 379 goto out_uninit;
378 380
379 gfs2_write_calc_reserv(ip, to - from, &data_blocks, &ind_blocks); 381 gfs2_write_calc_reserv(ip, write_len, &data_blocks, &ind_blocks);
380 382
381 error = gfs2_write_alloc_required(ip, pos, from - to, &alloc_required); 383 error = gfs2_write_alloc_required(ip, pos, write_len, &alloc_required);
382 if (error) 384 if (error)
383 goto out_unlock; 385 goto out_unlock;
384 386
385 387
388 ip->i_alloc.al_requested = 0;
386 if (alloc_required) { 389 if (alloc_required) {
387 al = gfs2_alloc_get(ip); 390 al = gfs2_alloc_get(ip);
388 391
@@ -482,7 +485,7 @@ static int gfs2_commit_write(struct file *file, struct page *page,
482 kaddr = kmap_atomic(page, KM_USER0); 485 kaddr = kmap_atomic(page, KM_USER0);
483 memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from, 486 memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from,
484 kaddr + from, to - from); 487 kaddr + from, to - from);
485 kunmap_atomic(page, KM_USER0); 488 kunmap_atomic(kaddr, KM_USER0);
486 489
487 SetPageUptodate(page); 490 SetPageUptodate(page);
488 491
diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h
index 9eedfd12bfff..b01e0cfc99b5 100644
--- a/fs/gfs2/rgrp.h
+++ b/fs/gfs2/rgrp.h
@@ -32,7 +32,7 @@ void gfs2_rgrp_repolish_clones(struct gfs2_rgrpd *rgd);
32struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip); 32struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip);
33static inline void gfs2_alloc_put(struct gfs2_inode *ip) 33static inline void gfs2_alloc_put(struct gfs2_inode *ip)
34{ 34{
35 return; /* Se we can see where ip->i_alloc is used */ 35 return; /* So we can see where ip->i_alloc is used */
36} 36}
37 37
38int gfs2_inplace_reserve_i(struct gfs2_inode *ip, 38int gfs2_inplace_reserve_i(struct gfs2_inode *ip,