diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-27 16:54:55 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-27 16:54:55 -0400 |
| commit | e472233fc52d9556cab7d8a1164ccd93ab36fb91 (patch) | |
| tree | 9b5f8262ca8517532616cdd537c8867cee915c65 | |
| parent | 72e19b3b22f43b20ee84db0deba33c71803cbe34 (diff) | |
| parent | d6817cdbd143f87f9d7c59a4c3194091190eeb84 (diff) | |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
ocfs2: Increment the reference count of an already-active stack.
[PATCH] configfs: Consolidate locking around configfs_detach_prep() in configfs_rmdir()
ocfs2: correctly set i_blocks after inline dir gets expanded
ocfs2: Jump to correct label in ocfs2_expand_inline_dir()
ocfs2: Fix sleep-with-spinlock recovery regression
[PATCH] ocfs2/cluster/netdebug.c: fix warning
[PATCH] ocfs2/cluster/tcp.c: make some functions static
| -rw-r--r-- | fs/configfs/dir.c | 17 | ||||
| -rw-r--r-- | fs/ocfs2/cluster/netdebug.c | 26 | ||||
| -rw-r--r-- | fs/ocfs2/cluster/tcp.c | 44 | ||||
| -rw-r--r-- | fs/ocfs2/cluster/tcp_internal.h | 32 | ||||
| -rw-r--r-- | fs/ocfs2/dir.c | 11 | ||||
| -rw-r--r-- | fs/ocfs2/journal.c | 23 | ||||
| -rw-r--r-- | fs/ocfs2/stackglue.c | 7 |
7 files changed, 83 insertions, 77 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 7a8db78a91d..8e93341f3e8 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c | |||
| @@ -1311,16 +1311,18 @@ static int configfs_rmdir(struct inode *dir, struct dentry *dentry) | |||
| 1311 | * Ensure that no racing symlink() will make detach_prep() fail while | 1311 | * Ensure that no racing symlink() will make detach_prep() fail while |
| 1312 | * the new link is temporarily attached | 1312 | * the new link is temporarily attached |
| 1313 | */ | 1313 | */ |
| 1314 | mutex_lock(&configfs_symlink_mutex); | ||
| 1315 | spin_lock(&configfs_dirent_lock); | ||
| 1316 | do { | 1314 | do { |
| 1317 | struct mutex *wait_mutex; | 1315 | struct mutex *wait_mutex; |
| 1318 | 1316 | ||
| 1317 | mutex_lock(&configfs_symlink_mutex); | ||
| 1318 | spin_lock(&configfs_dirent_lock); | ||
| 1319 | ret = configfs_detach_prep(dentry, &wait_mutex); | 1319 | ret = configfs_detach_prep(dentry, &wait_mutex); |
| 1320 | if (ret) { | 1320 | if (ret) |
| 1321 | configfs_detach_rollback(dentry); | 1321 | configfs_detach_rollback(dentry); |
| 1322 | spin_unlock(&configfs_dirent_lock); | 1322 | spin_unlock(&configfs_dirent_lock); |
| 1323 | mutex_unlock(&configfs_symlink_mutex); | 1323 | mutex_unlock(&configfs_symlink_mutex); |
| 1324 | |||
| 1325 | if (ret) { | ||
| 1324 | if (ret != -EAGAIN) { | 1326 | if (ret != -EAGAIN) { |
| 1325 | config_item_put(parent_item); | 1327 | config_item_put(parent_item); |
| 1326 | return ret; | 1328 | return ret; |
| @@ -1329,13 +1331,8 @@ static int configfs_rmdir(struct inode *dir, struct dentry *dentry) | |||
| 1329 | /* Wait until the racing operation terminates */ | 1331 | /* Wait until the racing operation terminates */ |
| 1330 | mutex_lock(wait_mutex); | 1332 | mutex_lock(wait_mutex); |
| 1331 | mutex_unlock(wait_mutex); | 1333 | mutex_unlock(wait_mutex); |
| 1332 | |||
| 1333 | mutex_lock(&configfs_symlink_mutex); | ||
| 1334 | spin_lock(&configfs_dirent_lock); | ||
| 1335 | } | 1334 | } |
| 1336 | } while (ret == -EAGAIN); | 1335 | } while (ret == -EAGAIN); |
| 1337 | spin_unlock(&configfs_dirent_lock); | ||
| 1338 | mutex_unlock(&configfs_symlink_mutex); | ||
| 1339 | 1336 | ||
| 1340 | /* Get a working ref for the duration of this function */ | 1337 | /* Get a working ref for the duration of this function */ |
| 1341 | item = configfs_get_config_item(dentry); | 1338 | item = configfs_get_config_item(dentry); |
diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c index d8bfa0eb41b..52276c02f71 100644 --- a/fs/ocfs2/cluster/netdebug.c +++ b/fs/ocfs2/cluster/netdebug.c | |||
| @@ -138,20 +138,20 @@ static int nst_seq_show(struct seq_file *seq, void *v) | |||
| 138 | " message id: %d\n" | 138 | " message id: %d\n" |
| 139 | " message type: %u\n" | 139 | " message type: %u\n" |
| 140 | " message key: 0x%08x\n" | 140 | " message key: 0x%08x\n" |
| 141 | " sock acquiry: %lu.%lu\n" | 141 | " sock acquiry: %lu.%ld\n" |
| 142 | " send start: %lu.%lu\n" | 142 | " send start: %lu.%ld\n" |
| 143 | " wait start: %lu.%lu\n", | 143 | " wait start: %lu.%ld\n", |
| 144 | nst, (unsigned long)nst->st_task->pid, | 144 | nst, (unsigned long)nst->st_task->pid, |
| 145 | (unsigned long)nst->st_task->tgid, | 145 | (unsigned long)nst->st_task->tgid, |
| 146 | nst->st_task->comm, nst->st_node, | 146 | nst->st_task->comm, nst->st_node, |
| 147 | nst->st_sc, nst->st_id, nst->st_msg_type, | 147 | nst->st_sc, nst->st_id, nst->st_msg_type, |
| 148 | nst->st_msg_key, | 148 | nst->st_msg_key, |
| 149 | nst->st_sock_time.tv_sec, | 149 | nst->st_sock_time.tv_sec, |
| 150 | (unsigned long)nst->st_sock_time.tv_usec, | 150 | (long)nst->st_sock_time.tv_usec, |
| 151 | nst->st_send_time.tv_sec, | 151 | nst->st_send_time.tv_sec, |
| 152 | (unsigned long)nst->st_send_time.tv_usec, | 152 | (long)nst->st_send_time.tv_usec, |
| 153 | nst->st_status_time.tv_sec, | 153 | nst->st_status_time.tv_sec, |
| 154 | nst->st_status_time.tv_usec); | 154 | (long)nst->st_status_time.tv_usec); |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | spin_unlock(&o2net_debug_lock); | 157 | spin_unlock(&o2net_debug_lock); |
| @@ -276,7 +276,7 @@ static void *sc_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
| 276 | return sc; /* unused, just needs to be null when done */ | 276 | return sc; /* unused, just needs to be null when done */ |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | #define TV_SEC_USEC(TV) TV.tv_sec, (unsigned long)TV.tv_usec | 279 | #define TV_SEC_USEC(TV) TV.tv_sec, (long)TV.tv_usec |
| 280 | 280 | ||
| 281 | static int sc_seq_show(struct seq_file *seq, void *v) | 281 | static int sc_seq_show(struct seq_file *seq, void *v) |
| 282 | { | 282 | { |
| @@ -309,12 +309,12 @@ static int sc_seq_show(struct seq_file *seq, void *v) | |||
| 309 | " remote node: %s\n" | 309 | " remote node: %s\n" |
| 310 | " page off: %zu\n" | 310 | " page off: %zu\n" |
| 311 | " handshake ok: %u\n" | 311 | " handshake ok: %u\n" |
| 312 | " timer: %lu.%lu\n" | 312 | " timer: %lu.%ld\n" |
| 313 | " data ready: %lu.%lu\n" | 313 | " data ready: %lu.%ld\n" |
| 314 | " advance start: %lu.%lu\n" | 314 | " advance start: %lu.%ld\n" |
| 315 | " advance stop: %lu.%lu\n" | 315 | " advance stop: %lu.%ld\n" |
| 316 | " func start: %lu.%lu\n" | 316 | " func start: %lu.%ld\n" |
| 317 | " func stop: %lu.%lu\n" | 317 | " func stop: %lu.%ld\n" |
| 318 | " func key: %u\n" | 318 | " func key: %u\n" |
| 319 | " func type: %u\n", | 319 | " func type: %u\n", |
| 320 | sc, | 320 | sc, |
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index a27d61581bd..2bcf706d9dd 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
| @@ -143,8 +143,8 @@ static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); | |||
| 143 | static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); | 143 | static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); |
| 144 | 144 | ||
| 145 | #ifdef CONFIG_DEBUG_FS | 145 | #ifdef CONFIG_DEBUG_FS |
| 146 | void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | 146 | static void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, |
| 147 | u32 msgkey, struct task_struct *task, u8 node) | 147 | u32 msgkey, struct task_struct *task, u8 node) |
| 148 | { | 148 | { |
| 149 | INIT_LIST_HEAD(&nst->st_net_debug_item); | 149 | INIT_LIST_HEAD(&nst->st_net_debug_item); |
| 150 | nst->st_task = task; | 150 | nst->st_task = task; |
| @@ -153,31 +153,61 @@ void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | |||
| 153 | nst->st_node = node; | 153 | nst->st_node = node; |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) | 156 | static void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) |
| 157 | { | 157 | { |
| 158 | do_gettimeofday(&nst->st_sock_time); | 158 | do_gettimeofday(&nst->st_sock_time); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | void o2net_set_nst_send_time(struct o2net_send_tracking *nst) | 161 | static void o2net_set_nst_send_time(struct o2net_send_tracking *nst) |
| 162 | { | 162 | { |
| 163 | do_gettimeofday(&nst->st_send_time); | 163 | do_gettimeofday(&nst->st_send_time); |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | void o2net_set_nst_status_time(struct o2net_send_tracking *nst) | 166 | static void o2net_set_nst_status_time(struct o2net_send_tracking *nst) |
| 167 | { | 167 | { |
| 168 | do_gettimeofday(&nst->st_status_time); | 168 | do_gettimeofday(&nst->st_status_time); |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, | 171 | static void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, |
| 172 | struct o2net_sock_container *sc) | 172 | struct o2net_sock_container *sc) |
| 173 | { | 173 | { |
| 174 | nst->st_sc = sc; | 174 | nst->st_sc = sc; |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) | 177 | static void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) |
| 178 | { | 178 | { |
| 179 | nst->st_id = msg_id; | 179 | nst->st_id = msg_id; |
| 180 | } | 180 | } |
| 181 | |||
| 182 | #else /* CONFIG_DEBUG_FS */ | ||
| 183 | |||
| 184 | static inline void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
| 185 | u32 msgkey, struct task_struct *task, u8 node) | ||
| 186 | { | ||
| 187 | } | ||
| 188 | |||
| 189 | static inline void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) | ||
| 190 | { | ||
| 191 | } | ||
| 192 | |||
| 193 | static inline void o2net_set_nst_send_time(struct o2net_send_tracking *nst) | ||
| 194 | { | ||
| 195 | } | ||
| 196 | |||
| 197 | static inline void o2net_set_nst_status_time(struct o2net_send_tracking *nst) | ||
| 198 | { | ||
| 199 | } | ||
| 200 | |||
| 201 | static inline void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, | ||
| 202 | struct o2net_sock_container *sc) | ||
| 203 | { | ||
| 204 | } | ||
