diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:23:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:23:07 -0400 |
commit | 22484856402bfa1ff3defe47f6029ab0418240d9 (patch) | |
tree | 140c67bf59674da350a7b51765d6ff7eb101b597 /fs/reiserfs | |
parent | 5ed487bc2c44ca4e9668ef9cb54c830e2a9fac47 (diff) | |
parent | 56b26add02b4bdea81d5e0ebda60db1fe3311ad4 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev
* git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev: (66 commits)
[PATCH] kill the rest of struct file propagation in block ioctls
[PATCH] get rid of struct file use in blkdev_ioctl() BLKBSZSET
[PATCH] get rid of blkdev_locked_ioctl()
[PATCH] get rid of blkdev_driver_ioctl()
[PATCH] sanitize blkdev_get() and friends
[PATCH] remember mode of reiserfs journal
[PATCH] propagate mode through swsusp_close()
[PATCH] propagate mode through open_bdev_excl/close_bdev_excl
[PATCH] pass fmode_t to blkdev_put()
[PATCH] kill the unused bsize on the send side of /dev/loop
[PATCH] trim file propagation in block/compat_ioctl.c
[PATCH] end of methods switch: remove the old ones
[PATCH] switch sr
[PATCH] switch sd
[PATCH] switch ide-scsi
[PATCH] switch tape_block
[PATCH] switch dcssblk
[PATCH] switch dasd
[PATCH] switch mtd_blkdevs
[PATCH] switch mmc
...
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/journal.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index c21df71943a6..9643c3bbeb3b 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -2575,7 +2575,7 @@ static int release_journal_dev(struct super_block *super, | |||
2575 | if (journal->j_dev_bd != NULL) { | 2575 | if (journal->j_dev_bd != NULL) { |
2576 | if (journal->j_dev_bd->bd_dev != super->s_dev) | 2576 | if (journal->j_dev_bd->bd_dev != super->s_dev) |
2577 | bd_release(journal->j_dev_bd); | 2577 | bd_release(journal->j_dev_bd); |
2578 | result = blkdev_put(journal->j_dev_bd); | 2578 | result = blkdev_put(journal->j_dev_bd, journal->j_dev_mode); |
2579 | journal->j_dev_bd = NULL; | 2579 | journal->j_dev_bd = NULL; |
2580 | } | 2580 | } |
2581 | 2581 | ||
@@ -2593,7 +2593,7 @@ static int journal_init_dev(struct super_block *super, | |||
2593 | { | 2593 | { |
2594 | int result; | 2594 | int result; |
2595 | dev_t jdev; | 2595 | dev_t jdev; |
2596 | int blkdev_mode = FMODE_READ | FMODE_WRITE; | 2596 | fmode_t blkdev_mode = FMODE_READ | FMODE_WRITE; |
2597 | char b[BDEVNAME_SIZE]; | 2597 | char b[BDEVNAME_SIZE]; |
2598 | 2598 | ||
2599 | result = 0; | 2599 | result = 0; |
@@ -2608,6 +2608,7 @@ static int journal_init_dev(struct super_block *super, | |||
2608 | /* there is no "jdev" option and journal is on separate device */ | 2608 | /* there is no "jdev" option and journal is on separate device */ |
2609 | if ((!jdev_name || !jdev_name[0])) { | 2609 | if ((!jdev_name || !jdev_name[0])) { |
2610 | journal->j_dev_bd = open_by_devnum(jdev, blkdev_mode); | 2610 | journal->j_dev_bd = open_by_devnum(jdev, blkdev_mode); |
2611 | journal->j_dev_mode = blkdev_mode; | ||
2611 | if (IS_ERR(journal->j_dev_bd)) { | 2612 | if (IS_ERR(journal->j_dev_bd)) { |
2612 | result = PTR_ERR(journal->j_dev_bd); | 2613 | result = PTR_ERR(journal->j_dev_bd); |
2613 | journal->j_dev_bd = NULL; | 2614 | journal->j_dev_bd = NULL; |
@@ -2618,7 +2619,7 @@ static int journal_init_dev(struct super_block *super, | |||
2618 | } else if (jdev != super->s_dev) { | 2619 | } else if (jdev != super->s_dev) { |
2619 | result = bd_claim(journal->j_dev_bd, journal); | 2620 | result = bd_claim(journal->j_dev_bd, journal); |
2620 | if (result) { | 2621 | if (result) { |
2621 | blkdev_put(journal->j_dev_bd); | 2622 | blkdev_put(journal->j_dev_bd, blkdev_mode); |
2622 | return result; | 2623 | return result; |
2623 | } | 2624 | } |
2624 | 2625 | ||
@@ -2628,7 +2629,9 @@ static int journal_init_dev(struct super_block *super, | |||
2628 | return 0; | 2629 | return 0; |
2629 | } | 2630 | } |
2630 | 2631 | ||
2631 | journal->j_dev_bd = open_bdev_excl(jdev_name, 0, journal); | 2632 | journal->j_dev_mode = blkdev_mode; |
2633 | journal->j_dev_bd = open_bdev_exclusive(jdev_name, | ||
2634 | blkdev_mode, journal); | ||
2632 | if (IS_ERR(journal->j_dev_bd)) { | 2635 | if (IS_ERR(journal->j_dev_bd)) { |
2633 | result = PTR_ERR(journal->j_dev_bd); | 2636 | result = PTR_ERR(journal->j_dev_bd); |
2634 | journal->j_dev_bd = NULL; | 2637 | journal->j_dev_bd = NULL; |