aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-07 13:09:12 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-07 13:09:12 -0500
commit0782588b63d0a4307fd277b35c449a17bc59ccc0 (patch)
tree5eceda980d8cdeaa792ef9f5148b979a39caa1f5
parentd694c16bc332c7e706f44e3d10bea06228166a6f (diff)
parentc3f49bc209b28d2b5f82b78baaa827eb3a4d1891 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes: [GFS2] Fix bz 229873, alternate test: assertion "!ip->i_inode.i_mapping->nrpages" failed [GFS2] build fix [GFS2] go_drop_bh is never used, so remove it [GFS2] Remove unused variable [GFS2] Fix bz 229831, lookup returns wrong inode [GFS2] Fix bz 230143, incorrect flushing of rgrps [GFS2] pass formal ino in do_filldir_main [DLM] fs/dlm/user.c should #include "user.h" [GFS2] fix hangup when multiple processes are trying to write to the same file [GFS2] NFS filehandle check [GFS2] add newline to printk message [GFS2] fix locking mistake
-rw-r--r--fs/dlm/user.c1
-rw-r--r--fs/gfs2/glock.c4
-rw-r--r--fs/gfs2/glops.c3
-rw-r--r--fs/gfs2/incore.h2
-rw-r--r--fs/gfs2/inode.c7
-rw-r--r--fs/gfs2/ops_address.c7
-rw-r--r--fs/gfs2/ops_export.c5
-rw-r--r--fs/gfs2/ops_fstype.c2
-rw-r--r--fs/gfs2/quota.c2
-rw-r--r--fs/gfs2/super.c1
10 files changed, 16 insertions, 18 deletions
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 40db61dc95f2..3870150b83a4 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -22,6 +22,7 @@
22#include "lockspace.h" 22#include "lockspace.h"
23#include "lock.h" 23#include "lock.h"
24#include "lvb_table.h" 24#include "lvb_table.h"
25#include "user.h"
25 26
26static const char *name_prefix="dlm"; 27static const char *name_prefix="dlm";
27static struct miscdevice ctl_device; 28static struct miscdevice ctl_device;
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 6618c1190252..12accb08fe02 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -20,6 +20,7 @@
20#include <linux/list.h> 20#include <linux/list.h>
21#include <linux/lm_interface.h> 21#include <linux/lm_interface.h>
22#include <linux/wait.h> 22#include <linux/wait.h>
23#include <linux/module.h>
23#include <linux/rwsem.h> 24#include <linux/rwsem.h>
24#include <asm/uaccess.h> 25#include <asm/uaccess.h>
25 26
@@ -953,9 +954,6 @@ static void drop_bh(struct gfs2_glock *gl, unsigned int ret)
953 spin_unlock(&gl->gl_spin); 954 spin_unlock(&gl->gl_spin);
954 } 955 }
955 956
956 if (glops->go_drop_bh)
957 glops->go_drop_bh(gl);
958
959 spin_lock(&gl->gl_spin); 957 spin_lock(&gl->gl_spin);
960 gl->gl_req_gh = NULL; 958 gl->gl_req_gh = NULL;
961 gl->gl_req_bh = NULL; 959 gl->gl_req_bh = NULL;
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index 46af55355513..39c8ae23bd9c 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -245,7 +245,6 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
245 245
246 if (ip && S_ISREG(ip->i_inode.i_mode)) { 246 if (ip && S_ISREG(ip->i_inode.i_mode)) {
247 truncate_inode_pages(ip->i_inode.i_mapping, 0); 247 truncate_inode_pages(ip->i_inode.i_mapping, 0);
248 gfs2_assert_withdraw(GFS2_SB(&ip->i_inode), !ip->i_inode.i_mapping->nrpages);
249 clear_bit(GIF_PAGED, &ip->i_flags); 248 clear_bit(GIF_PAGED, &ip->i_flags);
250 } 249 }
251} 250}
@@ -459,6 +458,8 @@ const struct gfs2_glock_operations gfs2_inode_glops = {
459}; 458};
460 459
461const struct gfs2_glock_operations gfs2_rgrp_glops = { 460const struct gfs2_glock_operations gfs2_rgrp_glops = {
461 .go_xmote_th = meta_go_sync,
462 .go_drop_th = meta_go_sync,
462 .go_inval = meta_go_inval, 463 .go_inval = meta_go_inval,
463 .go_demote_ok = rgrp_go_demote_ok, 464 .go_demote_ok = rgrp_go_demote_ok,
464 .go_lock = rgrp_go_lock, 465 .go_lock = rgrp_go_lock,
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 12c80fd28db5..49f0dbf40d86 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -104,7 +104,6 @@ struct gfs2_glock_operations {
104 void (*go_xmote_th) (struct gfs2_glock *gl); 104 void (*go_xmote_th) (struct gfs2_glock *gl);
105 void (*go_xmote_bh) (struct gfs2_glock *gl); 105 void (*go_xmote_bh) (struct gfs2_glock *gl);
106 void (*go_drop_th) (struct gfs2_glock *gl); 106 void (*go_drop_th) (struct gfs2_glock *gl);
107 void (*go_drop_bh) (struct gfs2_glock *gl);
108 void (*go_inval) (struct gfs2_glock *gl, int flags); 107 void (*go_inval) (struct gfs2_glock *gl, int flags);
109 int (*go_demote_ok) (struct gfs2_glock *gl); 108 int (*go_demote_ok) (struct gfs2_glock *gl);
110 int (*go_lock) (struct gfs2_holder *gh); 109 int (*go_lock) (struct gfs2_holder *gh);
@@ -416,7 +415,6 @@ struct gfs2_tune {
416 unsigned int gt_stall_secs; /* Detects trouble! */ 415 unsigned int gt_stall_secs; /* Detects trouble! */
417 unsigned int gt_complain_secs; 416 unsigned int gt_complain_secs;
418 unsigned int gt_reclaim_limit; /* Max num of glocks in reclaim list */ 417 unsigned int gt_reclaim_limit; /* Max num of glocks in reclaim list */
419 unsigned int gt_entries_per_readdir;
420 unsigned int gt_statfs_quantum; 418 unsigned int gt_statfs_quantum;
421 unsigned int gt_statfs_slow; 419 unsigned int gt_statfs_slow;
422}; 420};
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 0d6831a40565..df0b8b3018b9 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -43,7 +43,8 @@ static int iget_test(struct inode *inode, void *opaque)
43 struct gfs2_inode *ip = GFS2_I(inode); 43 struct gfs2_inode *ip = GFS2_I(inode);
44 struct gfs2_inum_host *inum = opaque; 44 struct gfs2_inum_host *inum = opaque;
45 45
46 if (ip->i_num.no_addr == inum->no_addr) 46 if (ip->i_num.no_addr == inum->no_addr &&
47 inode->i_private != NULL)
47 return 1; 48 return 1;
48 49
49 return 0; 50 return 0;
@@ -61,13 +62,13 @@ static int iget_set(struct inode *inode, void *opaque)
61 62
62struct inode *gfs2_ilookup(struct super_block *sb, struct gfs2_inum_host *inum) 63struct inode *gfs2_ilookup(struct super_block *sb, struct gfs2_inum_host *inum)
63{ 64{
64 return ilookup5(sb, (unsigned long)inum->no_formal_ino, 65 return ilookup5(sb, (unsigned long)inum->no_addr,
65 iget_test, inum); 66 iget_test, inum);
66} 67}
67 68
68static struct inode *gfs2_iget(struct super_block *sb, struct gfs2_inum_host *inum) 69static struct inode *gfs2_iget(struct super_block *sb, struct gfs2_inum_host *inum)
69{ 70{
70 return iget5_locked(sb, (unsigned long)inum->no_formal_ino, 71 return iget5_locked(sb, (unsigned long)inum->no_addr,
71 iget_test, iget_set, inum); 72 iget_test, iget_set, inum);
72} 73}
73 74
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index 56e33590b656..b3b7e8475359 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -266,9 +266,11 @@ skip_lock:
266out: 266out:
267 return error; 267 return error;
268out_unlock: 268out_unlock:
269 if (error == GLR_TRYFAILED)
270 error = AOP_TRUNCATED_PAGE;
271 unlock_page(page); 269 unlock_page(page);
270 if (error == GLR_TRYFAILED) {
271 error = AOP_TRUNCATED_PAGE;
272 yield();
273 }
272 if (do_unlock) 274 if (do_unlock)
273 gfs2_holder_uninit(&gh); 275 gfs2_holder_uninit(&gh);
274 goto out; 276 goto out;
@@ -364,6 +366,7 @@ static int gfs2_prepare_write(struct file *file, struct page *page,
364 if (error == GLR_TRYFAILED) { 366 if (error == GLR_TRYFAILED) {
365 unlock_page(page); 367 unlock_page(page);
366 error = AOP_TRUNCATED_PAGE; 368 error = AOP_TRUNCATED_PAGE;
369 yield();
367 } 370 }
368 goto out_uninit; 371 goto out_uninit;
369 } 372 }
diff --git a/fs/gfs2/ops_export.c b/fs/gfs2/ops_export.c
index 1de05b63d43a..aad918337a46 100644
--- a/fs/gfs2/ops_export.c
+++ b/fs/gfs2/ops_export.c
@@ -38,14 +38,11 @@ static struct dentry *gfs2_decode_fh(struct super_block *sb,
38 struct gfs2_fh_obj fh_obj; 38 struct gfs2_fh_obj fh_obj;
39 struct gfs2_inum_host *this, parent; 39 struct gfs2_inum_host *this, parent;
40 40
41 if (fh_type != fh_len)
42 return NULL;
43
44 this = &fh_obj.this; 41 this = &fh_obj.this;
45 fh_obj.imode = DT_UNKNOWN; 42 fh_obj.imode = DT_UNKNOWN;
46 memset(&parent, 0, sizeof(struct gfs2_inum)); 43 memset(&parent, 0, sizeof(struct gfs2_inum));
47 44
48 switch (fh_type) { 45 switch (fh_len) {
49 case GFS2_LARGE_FH_SIZE: 46 case GFS2_LARGE_FH_SIZE:
50 parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32; 47 parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32;
51 parent.no_formal_ino |= be32_to_cpu(fh[5]); 48 parent.no_formal_ino |= be32_to_cpu(fh[5]);
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index ee80b8a5e7bc..ee54cb667083 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -840,7 +840,7 @@ static struct super_block* get_gfs2_sb(const char *dev_name)
840 } 840 }
841 841
842 printk(KERN_WARNING "GFS2: Unrecognized block device or " 842 printk(KERN_WARNING "GFS2: Unrecognized block device or "
843 "mount point %s", dev_name); 843 "mount point %s\n", dev_name);
844 844
845free_nd: 845free_nd:
846 path_release(&nd); 846 path_release(&nd);
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index d0db881b55d2..c186857e48a8 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -279,7 +279,7 @@ static int bh_get(struct gfs2_quota_data *qd)
279 (bh->b_data + sizeof(struct gfs2_meta_header) + 279 (bh->b_data + sizeof(struct gfs2_meta_header) +
280 offset * sizeof(struct gfs2_quota_change)); 280 offset * sizeof(struct gfs2_quota_change));
281 281
282 mutex_lock(&sdp->sd_quota_mutex); 282 mutex_unlock(&sdp->sd_quota_mutex);
283 283
284 return 0; 284 return 0;
285 285
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 70f424fcf1cd..4fdda974dc83 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -76,7 +76,6 @@ void gfs2_tune_init(struct gfs2_tune *gt)
76 gt->gt_stall_secs = 600; 76 gt->gt_stall_secs = 600;
77 gt->gt_complain_secs = 10; 77 gt->gt_complain_secs = 10;
78 gt->gt_reclaim_limit = 5000; 78 gt->gt_reclaim_limit = 5000;
79 gt->gt_entries_per_readdir = 32;
80 gt->gt_statfs_quantum = 30; 79 gt->gt_statfs_quantum = 30;
81 gt->gt_statfs_slow = 0; 80 gt->gt_statfs_slow = 0;
82} 81}