aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-12-02 22:50:27 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-02 22:50:27 -0500
commitaa2ba5f1082dc705745899584aac8416d710c056 (patch)
treebde0bf4aff036c6bac19a0212194ae1092afb3c9 /fs/ocfs2
parent68024541e2e5a8f35e281daaa5068a29e2a538a5 (diff)
parentf6f7b52e2f6149d2ee365717afff315b05720162 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/ixgbe/ixgbe_main.c drivers/net/smc91x.c
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/buffer_head_io.c15
-rw-r--r--fs/ocfs2/dlm/dlmfs.c4
-rw-r--r--fs/ocfs2/dlm/userdlm.h2
-rw-r--r--fs/ocfs2/dlmglue.c3
-rw-r--r--fs/ocfs2/ocfs2.h2
-rw-r--r--fs/ocfs2/stack_user.c3
6 files changed, 13 insertions, 16 deletions
diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c
index 7e947c672469..3a178ec48d7c 100644
--- a/fs/ocfs2/buffer_head_io.c
+++ b/fs/ocfs2/buffer_head_io.c
@@ -112,7 +112,7 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,
112 bh = bhs[i]; 112 bh = bhs[i];
113 113
114 if (buffer_jbd(bh)) { 114 if (buffer_jbd(bh)) {
115 mlog(ML_ERROR, 115 mlog(ML_BH_IO,
116 "trying to sync read a jbd " 116 "trying to sync read a jbd "
117 "managed bh (blocknr = %llu), skipping\n", 117 "managed bh (blocknr = %llu), skipping\n",
118 (unsigned long long)bh->b_blocknr); 118 (unsigned long long)bh->b_blocknr);
@@ -147,15 +147,10 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,
147 for (i = nr; i > 0; i--) { 147 for (i = nr; i > 0; i--) {
148 bh = bhs[i - 1]; 148 bh = bhs[i - 1];
149 149
150 if (buffer_jbd(bh)) { 150 /* No need to wait on the buffer if it's managed by JBD. */
151 mlog(ML_ERROR, 151 if (!buffer_jbd(bh))
152 "the journal got the buffer while it was " 152 wait_on_buffer(bh);
153 "locked for io! (blocknr = %llu)\n",
154 (unsigned long long)bh->b_blocknr);
155 BUG();
156 }
157 153
158 wait_on_buffer(bh);
159 if (!buffer_uptodate(bh)) { 154 if (!buffer_uptodate(bh)) {
160 /* Status won't be cleared from here on out, 155 /* Status won't be cleared from here on out,
161 * so we can safely record this and loop back 156 * so we can safely record this and loop back
@@ -251,8 +246,6 @@ int ocfs2_read_blocks(struct inode *inode, u64 block, int nr,
251 ignore_cache = 1; 246 ignore_cache = 1;
252 } 247 }
253 248
254 /* XXX: Can we ever get this and *not* have the cached
255 * flag set? */
256 if (buffer_jbd(bh)) { 249 if (buffer_jbd(bh)) {
257 if (ignore_cache) 250 if (ignore_cache)
258 mlog(ML_BH_IO, "trying to sync read a jbd " 251 mlog(ML_BH_IO, "trying to sync read a jbd "
diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c
index 533a789c3ef8..ba962d71b34d 100644
--- a/fs/ocfs2/dlm/dlmfs.c
+++ b/fs/ocfs2/dlm/dlmfs.c
@@ -608,8 +608,10 @@ static int __init init_dlmfs_fs(void)
608 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| 608 0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
609 SLAB_MEM_SPREAD), 609 SLAB_MEM_SPREAD),
610 dlmfs_init_once); 610 dlmfs_init_once);
611 if (!dlmfs_inode_cache) 611 if (!dlmfs_inode_cache) {
612 status = -ENOMEM;
612 goto bail; 613 goto bail;
614 }
613 cleanup_inode = 1; 615 cleanup_inode = 1;
614 616
615 user_dlm_worker = create_singlethread_workqueue("user_dlm"); 617 user_dlm_worker = create_singlethread_workqueue("user_dlm");
diff --git a/fs/ocfs2/dlm/userdlm.h b/fs/ocfs2/dlm/userdlm.h
index 39ec27738499..0c3cc03c61fa 100644
--- a/fs/ocfs2/dlm/userdlm.h
+++ b/fs/ocfs2/dlm/userdlm.h
@@ -33,7 +33,7 @@
33#include <linux/workqueue.h> 33#include <linux/workqueue.h>
34 34
35/* user_lock_res->l_flags flags. */ 35/* user_lock_res->l_flags flags. */
36#define USER_LOCK_ATTACHED (0x00000001) /* have we initialized 36#define USER_LOCK_ATTACHED (0x00000001) /* we have initialized
37 * the lvb */ 37 * the lvb */
38#define USER_LOCK_BUSY (0x00000002) /* we are currently in 38#define USER_LOCK_BUSY (0x00000002) /* we are currently in
39 * dlm_lock */ 39 * dlm_lock */
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index ec684426034b..6e6cc0a2e5f7 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -2841,9 +2841,8 @@ static void ocfs2_unlock_ast(void *opaque, int error)
2841 2841
2842 lockres_clear_flags(lockres, OCFS2_LOCK_BUSY); 2842 lockres_clear_flags(lockres, OCFS2_LOCK_BUSY);
2843 lockres->l_unlock_action = OCFS2_UNLOCK_INVALID; 2843 lockres->l_unlock_action = OCFS2_UNLOCK_INVALID;
2844 spin_unlock_irqrestore(&lockres->l_lock, flags);
2845
2846 wake_up(&lockres->l_event); 2844 wake_up(&lockres->l_event);
2845 spin_unlock_irqrestore(&lockres->l_lock, flags);
2847 2846
2848 mlog_exit_void(); 2847 mlog_exit_void();
2849} 2848}
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index fef7ece32376..3fed9e3d8992 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -85,7 +85,7 @@ enum ocfs2_unlock_action {
85}; 85};
86 86
87/* ocfs2_lock_res->l_flags flags. */ 87/* ocfs2_lock_res->l_flags flags. */
88#define OCFS2_LOCK_ATTACHED (0x00000001) /* have we initialized 88#define OCFS2_LOCK_ATTACHED (0x00000001) /* we have initialized
89 * the lvb */ 89 * the lvb */
90#define OCFS2_LOCK_BUSY (0x00000002) /* we are currently in 90#define OCFS2_LOCK_BUSY (0x00000002) /* we are currently in
91 * dlm_lock */ 91 * dlm_lock */
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
index faec2d879357..9b76d41a8ac6 100644
--- a/fs/ocfs2/stack_user.c
+++ b/fs/ocfs2/stack_user.c
@@ -740,6 +740,9 @@ static int user_dlm_lock_status(union ocfs2_dlm_lksb *lksb)
740 740
741static void *user_dlm_lvb(union ocfs2_dlm_lksb *lksb) 741static void *user_dlm_lvb(union ocfs2_dlm_lksb *lksb)
742{ 742{
743 if (!lksb->lksb_fsdlm.sb_lvbptr)
744 lksb->lksb_fsdlm.sb_lvbptr = (char *)lksb +
745 sizeof(struct dlm_lksb);
743 return (void *)(lksb->lksb_fsdlm.sb_lvbptr); 746 return (void *)(lksb->lksb_fsdlm.sb_lvbptr);
744} 747}
745 748