Commit 0782588b authored by Linus Torvalds's avatar Linus Torvalds

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
parents d694c16b c3f49bc2
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "lockspace.h" #include "lockspace.h"
#include "lock.h" #include "lock.h"
#include "lvb_table.h" #include "lvb_table.h"
#include "user.h"
static const char *name_prefix="dlm"; static const char *name_prefix="dlm";
static struct miscdevice ctl_device; static struct miscdevice ctl_device;
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/lm_interface.h> #include <linux/lm_interface.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/module.h>
#include <linux/rwsem.h> #include <linux/rwsem.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -953,9 +954,6 @@ static void drop_bh(struct gfs2_glock *gl, unsigned int ret) ...@@ -953,9 +954,6 @@ static void drop_bh(struct gfs2_glock *gl, unsigned int ret)
spin_unlock(&gl->gl_spin); spin_unlock(&gl->gl_spin);
} }
if (glops->go_drop_bh)
glops->go_drop_bh(gl);
spin_lock(&gl->gl_spin); spin_lock(&gl->gl_spin);
gl->gl_req_gh = NULL; gl->gl_req_gh = NULL;
gl->gl_req_bh = NULL; gl->gl_req_bh = NULL;
......
...@@ -245,7 +245,6 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags) ...@@ -245,7 +245,6 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
if (ip && S_ISREG(ip->i_inode.i_mode)) { if (ip && S_ISREG(ip->i_inode.i_mode)) {
truncate_inode_pages(ip->i_inode.i_mapping, 0); truncate_inode_pages(ip->i_inode.i_mapping, 0);
gfs2_assert_withdraw(GFS2_SB(&ip->i_inode), !ip->i_inode.i_mapping->nrpages);
clear_bit(GIF_PAGED, &ip->i_flags); clear_bit(GIF_PAGED, &ip->i_flags);
} }
} }
...@@ -459,6 +458,8 @@ const struct gfs2_glock_operations gfs2_inode_glops = { ...@@ -459,6 +458,8 @@ const struct gfs2_glock_operations gfs2_inode_glops = {
}; };
const struct gfs2_glock_operations gfs2_rgrp_glops = { const struct gfs2_glock_operations gfs2_rgrp_glops = {
.go_xmote_th = meta_go_sync,
.go_drop_th = meta_go_sync,
.go_inval = meta_go_inval, .go_inval = meta_go_inval,
.go_demote_ok = rgrp_go_demote_ok, .go_demote_ok = rgrp_go_demote_ok,
.go_lock = rgrp_go_lock, .go_lock = rgrp_go_lock,
......
...@@ -104,7 +104,6 @@ struct gfs2_glock_operations { ...@@ -104,7 +104,6 @@ struct gfs2_glock_operations {
void (*go_xmote_th) (struct gfs2_glock *gl); void (*go_xmote_th) (struct gfs2_glock *gl);
void (*go_xmote_bh) (struct gfs2_glock *gl); void (*go_xmote_bh) (struct gfs2_glock *gl);
void (*go_drop_th) (struct gfs2_glock *gl); void (*go_drop_th) (struct gfs2_glock *gl);
void (*go_drop_bh) (struct gfs2_glock *gl);
void (*go_inval) (struct gfs2_glock *gl, int flags); void (*go_inval) (struct gfs2_glock *gl, int flags);
int (*go_demote_ok) (struct gfs2_glock *gl); int (*go_demote_ok) (struct gfs2_glock *gl);
int (*go_lock) (struct gfs2_holder *gh); int (*go_lock) (struct gfs2_holder *gh);
...@@ -416,7 +415,6 @@ struct gfs2_tune { ...@@ -416,7 +415,6 @@ struct gfs2_tune {
unsigned int gt_stall_secs; /* Detects trouble! */ unsigned int gt_stall_secs; /* Detects trouble! */
unsigned int gt_complain_secs; unsigned int gt_complain_secs;
unsigned int gt_reclaim_limit; /* Max num of glocks in reclaim list */ unsigned int gt_reclaim_limit; /* Max num of glocks in reclaim list */
unsigned int gt_entries_per_readdir;
unsigned int gt_statfs_quantum; unsigned int gt_statfs_quantum;
unsigned int gt_statfs_slow; unsigned int gt_statfs_slow;
}; };
......
...@@ -43,7 +43,8 @@ static int iget_test(struct inode *inode, void *opaque) ...@@ -43,7 +43,8 @@ static int iget_test(struct inode *inode, void *opaque)
struct gfs2_inode *ip = GFS2_I(inode); struct gfs2_inode *ip = GFS2_I(inode);
struct gfs2_inum_host *inum = opaque; struct gfs2_inum_host *inum = opaque;
if (ip->i_num.no_addr == inum->no_addr) if (ip->i_num.no_addr == inum->no_addr &&
inode->i_private != NULL)
return 1; return 1;
return 0; return 0;
...@@ -61,13 +62,13 @@ static int iget_set(struct inode *inode, void *opaque) ...@@ -61,13 +62,13 @@ static int iget_set(struct inode *inode, void *opaque)
struct inode *gfs2_ilookup(struct super_block *sb, struct gfs2_inum_host *inum) struct inode *gfs2_ilookup(struct super_block *sb, struct gfs2_inum_host *inum)
{ {
return ilookup5(sb, (unsigned long)inum->no_formal_ino, return ilookup5(sb, (unsigned long)inum->no_addr,
iget_test, inum); iget_test, inum);
} }
static struct inode *gfs2_iget(struct super_block *sb, struct gfs2_inum_host *inum) static struct inode *gfs2_iget(struct super_block *sb, struct gfs2_inum_host *inum)
{ {
return iget5_locked(sb, (unsigned long)inum->no_formal_ino, return iget5_locked(sb, (unsigned long)inum->no_addr,
iget_test, iget_set, inum); iget_test, iget_set, inum);
} }
......
...@@ -266,9 +266,11 @@ static int gfs2_readpage(struct file *file, struct page *page) ...@@ -266,9 +266,11 @@ static int gfs2_readpage(struct file *file, struct page *page)
out: out:
return error; return error;
out_unlock: out_unlock:
if (error == GLR_TRYFAILED)
error = AOP_TRUNCATED_PAGE;
unlock_page(page); unlock_page(page);
if (error == GLR_TRYFAILED) {
error = AOP_TRUNCATED_PAGE;
yield();
}
if (do_unlock) if (do_unlock)
gfs2_holder_uninit(&gh); gfs2_holder_uninit(&gh);
goto out; goto out;
...@@ -364,6 +366,7 @@ static int gfs2_prepare_write(struct file *file, struct page *page, ...@@ -364,6 +366,7 @@ static int gfs2_prepare_write(struct file *file, struct page *page,
if (error == GLR_TRYFAILED) { if (error == GLR_TRYFAILED) {
unlock_page(page); unlock_page(page);
error = AOP_TRUNCATED_PAGE; error = AOP_TRUNCATED_PAGE;
yield();
} }
goto out_uninit; goto out_uninit;
} }
......
...@@ -38,14 +38,11 @@ static struct dentry *gfs2_decode_fh(struct super_block *sb, ...@@ -38,14 +38,11 @@ static struct dentry *gfs2_decode_fh(struct super_block *sb,
struct gfs2_fh_obj fh_obj; struct gfs2_fh_obj fh_obj;
struct gfs2_inum_host *this, parent; struct gfs2_inum_host *this, parent;
if (fh_type != fh_len)
return NULL;
this = &fh_obj.this; this = &fh_obj.this;
fh_obj.imode = DT_UNKNOWN; fh_obj.imode = DT_UNKNOWN;
memset(&parent, 0, sizeof(struct gfs2_inum)); memset(&parent, 0, sizeof(struct gfs2_inum));
switch (fh_type) { switch (fh_len) {
case GFS2_LARGE_FH_SIZE: case GFS2_LARGE_FH_SIZE:
parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32; parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32;
parent.no_formal_ino |= be32_to_cpu(fh[5]); parent.no_formal_ino |= be32_to_cpu(fh[5]);
......
...@@ -840,7 +840,7 @@ static struct super_block* get_gfs2_sb(const char *dev_name) ...@@ -840,7 +840,7 @@ static struct super_block* get_gfs2_sb(const char *dev_name)
} }
printk(KERN_WARNING "GFS2: Unrecognized block device or " printk(KERN_WARNING "GFS2: Unrecognized block device or "
"mount point %s", dev_name); "mount point %s\n", dev_name);
free_nd: free_nd:
path_release(&nd); path_release(&nd);
......
...@@ -279,7 +279,7 @@ static int bh_get(struct gfs2_quota_data *qd) ...@@ -279,7 +279,7 @@ static int bh_get(struct gfs2_quota_data *qd)
(bh->b_data + sizeof(struct gfs2_meta_header) + (bh->b_data + sizeof(struct gfs2_meta_header) +
offset * sizeof(struct gfs2_quota_change)); offset * sizeof(struct gfs2_quota_change));
mutex_lock(&sdp->sd_quota_mutex); mutex_unlock(&sdp->sd_quota_mutex);
return 0; return 0;
......
...@@ -76,7 +76,6 @@ void gfs2_tune_init(struct gfs2_tune *gt) ...@@ -76,7 +76,6 @@ void gfs2_tune_init(struct gfs2_tune *gt)
gt->gt_stall_secs = 600; gt->gt_stall_secs = 600;
gt->gt_complain_secs = 10; gt->gt_complain_secs = 10;
gt->gt_reclaim_limit = 5000; gt->gt_reclaim_limit = 5000;
gt->gt_entries_per_readdir = 32;
gt->gt_statfs_quantum = 30; gt->gt_statfs_quantum = 30;
gt->gt_statfs_slow = 0; gt->gt_statfs_slow = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment