aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/super.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 13:45:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 13:45:01 -0500
commit275220f0fcff1adf28a717076e00f575edf05fda (patch)
treed249bccc80c64443dab211639050c4fb14332648 /fs/nilfs2/super.c
parentfe3c560b8a22cb28e54fe8950abef38e88d75831 (diff)
parent81c5e2ae33c4b19e53966b427e33646bf6811830 (diff)
Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block: (43 commits) block: ensure that completion error gets properly traced blktrace: add missing probe argument to block_bio_complete block cfq: don't use atomic_t for cfq_group block cfq: don't use atomic_t for cfq_queue block: trace event block fix unassigned field block: add internal hd part table references block: fix accounting bug on cross partition merges kref: add kref_test_and_get bio-integrity: mark kintegrityd_wq highpri and CPU intensive block: make kblockd_workqueue smarter Revert "sd: implement sd_check_events()" block: Clean up exit_io_context() source code. Fix compile warnings due to missing removal of a 'ret' variable fs/block: type signature of major_to_index(int) to major_to_index(unsigned) block: convert !IS_ERR(p) && p to !IS_ERR_NOR_NULL(p) cfq-iosched: don't check cfqg in choose_service_tree() fs/splice: Pull buf->ops->confirm() from splice_from_pipe actors cdrom: export cdrom_check_events() sd: implement sd_check_events() sr: implement sr_check_events() ...
Diffstat (limited to 'fs/nilfs2/super.c')
-rw-r--r--fs/nilfs2/super.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 70dfdd532b83..0994f6a76c07 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -1163,14 +1163,14 @@ nilfs_mount(struct file_system_type *fs_type, int flags,
1163{ 1163{
1164 struct nilfs_super_data sd; 1164 struct nilfs_super_data sd;
1165 struct super_block *s; 1165 struct super_block *s;
1166 fmode_t mode = FMODE_READ; 1166 fmode_t mode = FMODE_READ | FMODE_EXCL;
1167 struct dentry *root_dentry; 1167 struct dentry *root_dentry;
1168 int err, s_new = false; 1168 int err, s_new = false;
1169 1169
1170 if (!(flags & MS_RDONLY)) 1170 if (!(flags & MS_RDONLY))
1171 mode |= FMODE_WRITE; 1171 mode |= FMODE_WRITE;
1172 1172
1173 sd.bdev = open_bdev_exclusive(dev_name, mode, fs_type); 1173 sd.bdev = blkdev_get_by_path(dev_name, mode, fs_type);
1174 if (IS_ERR(sd.bdev)) 1174 if (IS_ERR(sd.bdev))
1175 return ERR_CAST(sd.bdev); 1175 return ERR_CAST(sd.bdev);
1176 1176
@@ -1249,7 +1249,7 @@ nilfs_mount(struct file_system_type *fs_type, int flags,
1249 } 1249 }
1250 1250
1251 if (!s_new) 1251 if (!s_new)
1252 close_bdev_exclusive(sd.bdev, mode); 1252 blkdev_put(sd.bdev, mode);
1253 1253
1254 return root_dentry; 1254 return root_dentry;
1255 1255
@@ -1258,7 +1258,7 @@ nilfs_mount(struct file_system_type *fs_type, int flags,
1258 1258
1259 failed: 1259 failed:
1260 if (!s_new) 1260 if (!s_new)
1261 close_bdev_exclusive(sd.bdev, mode); 1261 blkdev_put(sd.bdev, mode);
1262 return ERR_PTR(err); 1262 return ERR_PTR(err);
1263} 1263}
1264 1264