Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196024
b: refs/heads/master
c: 13e9055
h: refs/heads/master
v: v3
  • Loading branch information
Ryusuke Konishi committed May 10, 2010
1 parent 527102a commit 0cc3266
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 400ade845cb9930552e791bbd658a0953f68499d
refs/heads/master: 13e905592b3daacb6ec27a5a4169afe725c3b668
10 changes: 7 additions & 3 deletions trunk/fs/nilfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,10 +998,14 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags,
{
struct nilfs_super_data sd;
struct super_block *s;
fmode_t mode = FMODE_READ;
struct the_nilfs *nilfs;
int err, need_to_close = 1;

sd.bdev = open_bdev_exclusive(dev_name, flags, fs_type);
if (!(flags & MS_RDONLY))
mode |= FMODE_WRITE;

sd.bdev = open_bdev_exclusive(dev_name, mode, fs_type);
if (IS_ERR(sd.bdev))
return PTR_ERR(sd.bdev);

Expand Down Expand Up @@ -1082,15 +1086,15 @@ nilfs_get_sb(struct file_system_type *fs_type, int flags,
mutex_unlock(&nilfs->ns_mount_mutex);
put_nilfs(nilfs);
if (need_to_close)
close_bdev_exclusive(sd.bdev, flags);
close_bdev_exclusive(sd.bdev, mode);
simple_set_mnt(mnt, s);
return 0;

failed_unlock:
mutex_unlock(&nilfs->ns_mount_mutex);
put_nilfs(nilfs);
failed:
close_bdev_exclusive(sd.bdev, flags);
close_bdev_exclusive(sd.bdev, mode);

return err;

Expand Down

0 comments on commit 0cc3266

Please sign in to comment.