diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-12 11:02:03 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-12 11:02:03 -0400 |
commit | 82681a318f9f028ea64e61f24bbd9ac535531921 (patch) | |
tree | 529b6a5b4fd040fb54b7672b1a224ebd47445876 /fs/jfs | |
parent | 3860c97bd60a4525bb62eb90e3e7d2f02662ac59 (diff) | |
parent | 8ebf975608aaebd7feb33d77f07ba21a6380e086 (diff) |
[SCSI] Merge branch 'linus'
Conflicts:
drivers/message/fusion/mptsas.c
fixed up conflict between req->data_len accessors and mptsas driver updates.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/jfs_imap.c | 1 | ||||
-rw-r--r-- | fs/jfs/super.c | 31 |
2 files changed, 27 insertions, 5 deletions
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index 346057218edc..0fc30407f039 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c | |||
@@ -2571,6 +2571,7 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp) | |||
2571 | 2571 | ||
2572 | txAbort(tid, 0); | 2572 | txAbort(tid, 0); |
2573 | txEnd(tid); | 2573 | txEnd(tid); |
2574 | mutex_unlock(&JFS_IP(ipimap)->commit_mutex); | ||
2574 | 2575 | ||
2575 | /* release the inode map lock */ | 2576 | /* release the inode map lock */ |
2576 | IWRITE_UNLOCK(ipimap); | 2577 | IWRITE_UNLOCK(ipimap); |
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 6f21adf9479a..09b1b6ee2186 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/crc32.h> | 32 | #include <linux/crc32.h> |
33 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
34 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
35 | #include <linux/smp_lock.h> | ||
35 | 36 | ||
36 | #include "jfs_incore.h" | 37 | #include "jfs_incore.h" |
37 | #include "jfs_filsys.h" | 38 | #include "jfs_filsys.h" |
@@ -183,6 +184,9 @@ static void jfs_put_super(struct super_block *sb) | |||
183 | int rc; | 184 | int rc; |
184 | 185 | ||
185 | jfs_info("In jfs_put_super"); | 186 | jfs_info("In jfs_put_super"); |
187 | |||
188 | lock_kernel(); | ||
189 | |||
186 | rc = jfs_umount(sb); | 190 | rc = jfs_umount(sb); |
187 | if (rc) | 191 | if (rc) |
188 | jfs_err("jfs_umount failed with return code %d", rc); | 192 | jfs_err("jfs_umount failed with return code %d", rc); |
@@ -195,6 +199,8 @@ static void jfs_put_super(struct super_block *sb) | |||
195 | sbi->direct_inode = NULL; | 199 | sbi->direct_inode = NULL; |
196 | 200 | ||
197 | kfree(sbi); | 201 | kfree(sbi); |
202 | |||
203 | unlock_kernel(); | ||
198 | } | 204 | } |
199 | 205 | ||
200 | enum { | 206 | enum { |
@@ -370,19 +376,24 @@ static int jfs_remount(struct super_block *sb, int *flags, char *data) | |||
370 | s64 newLVSize = 0; | 376 | s64 newLVSize = 0; |
371 | int rc = 0; | 377 | int rc = 0; |
372 | int flag = JFS_SBI(sb)->flag; | 378 | int flag = JFS_SBI(sb)->flag; |
379 | int ret; | ||
373 | 380 | ||
374 | if (!parse_options(data, sb, &newLVSize, &flag)) { | 381 | if (!parse_options(data, sb, &newLVSize, &flag)) { |
375 | return -EINVAL; | 382 | return -EINVAL; |
376 | } | 383 | } |
384 | lock_kernel(); | ||
377 | if (newLVSize) { | 385 | if (newLVSize) { |
378 | if (sb->s_flags & MS_RDONLY) { | 386 | if (sb->s_flags & MS_RDONLY) { |
379 | printk(KERN_ERR | 387 | printk(KERN_ERR |
380 | "JFS: resize requires volume to be mounted read-write\n"); | 388 | "JFS: resize requires volume to be mounted read-write\n"); |
389 | unlock_kernel(); | ||
381 | return -EROFS; | 390 | return -EROFS; |
382 | } | 391 | } |
383 | rc = jfs_extendfs(sb, newLVSize, 0); | 392 | rc = jfs_extendfs(sb, newLVSize, 0); |
384 | if (rc) | 393 | if (rc) { |
394 | unlock_kernel(); | ||
385 | return rc; | 395 | return rc; |
396 | } | ||
386 | } | 397 | } |
387 | 398 | ||
388 | if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) { | 399 | if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) { |
@@ -393,23 +404,31 @@ static int jfs_remount(struct super_block *sb, int *flags, char *data) | |||
393 | truncate_inode_pages(JFS_SBI(sb)->direct_inode->i_mapping, 0); | 404 | truncate_inode_pages(JFS_SBI(sb)->direct_inode->i_mapping, 0); |
394 | 405 | ||
395 | JFS_SBI(sb)->flag = flag; | 406 | JFS_SBI(sb)->flag = flag; |
396 | return jfs_mount_rw(sb, 1); | 407 | ret = jfs_mount_rw(sb, 1); |
408 | unlock_kernel(); | ||
409 | return ret; | ||
397 | } | 410 | } |
398 | if ((!(sb->s_flags & MS_RDONLY)) && (*flags & MS_RDONLY)) { | 411 | if ((!(sb->s_flags & MS_RDONLY)) && (*flags & MS_RDONLY)) { |
399 | rc = jfs_umount_rw(sb); | 412 | rc = jfs_umount_rw(sb); |
400 | JFS_SBI(sb)->flag = flag; | 413 | JFS_SBI(sb)->flag = flag; |
414 | unlock_kernel(); | ||
401 | return rc; | 415 | return rc; |
402 | } | 416 | } |
403 | if ((JFS_SBI(sb)->flag & JFS_NOINTEGRITY) != (flag & JFS_NOINTEGRITY)) | 417 | if ((JFS_SBI(sb)->flag & JFS_NOINTEGRITY) != (flag & JFS_NOINTEGRITY)) |
404 | if (!(sb->s_flags & MS_RDONLY)) { | 418 | if (!(sb->s_flags & MS_RDONLY)) { |
405 | rc = jfs_umount_rw(sb); | 419 | rc = jfs_umount_rw(sb); |
406 | if (rc) | 420 | if (rc) { |
421 | unlock_kernel(); | ||
407 | return rc; | 422 | return rc; |
423 | } | ||
408 | JFS_SBI(sb)->flag = flag; | 424 | JFS_SBI(sb)->flag = flag; |
409 | return jfs_mount_rw(sb, 1); | 425 | ret = jfs_mount_rw(sb, 1); |
426 | unlock_kernel(); | ||
427 | return ret; | ||
410 | } | 428 | } |
411 | JFS_SBI(sb)->flag = flag; | 429 | JFS_SBI(sb)->flag = flag; |
412 | 430 | ||
431 | unlock_kernel(); | ||
413 | return 0; | 432 | return 0; |
414 | } | 433 | } |
415 | 434 | ||
@@ -720,8 +739,10 @@ static ssize_t jfs_quota_write(struct super_block *sb, int type, | |||
720 | blk++; | 739 | blk++; |
721 | } | 740 | } |
722 | out: | 741 | out: |
723 | if (len == towrite) | 742 | if (len == towrite) { |
743 | mutex_unlock(&inode->i_mutex); | ||
724 | return err; | 744 | return err; |
745 | } | ||
725 | if (inode->i_size < off+len-towrite) | 746 | if (inode->i_size < off+len-towrite) |
726 | i_size_write(inode, off+len-towrite); | 747 | i_size_write(inode, off+len-towrite); |
727 | inode->i_version++; | 748 | inode->i_version++; |