#include <linux/parser.h>
#include <linux/random.h>
#include <linux/crc32.h>
-#include <linux/smp_lock.h>
#include <linux/vfs.h>
#include <linux/writeback.h>
#include <linux/kobject.h>
struct nilfs_sb_info *sbi = NILFS_SB(sb);
struct the_nilfs *nilfs = sbi->s_nilfs;
- lock_kernel();
-
nilfs_detach_segment_constructor(sbi);
if (!(sb->s_flags & MS_RDONLY)) {
sbi->s_super = NULL;
sb->s_fs_info = NULL;
nilfs_put_sbinfo(sbi);
-
- unlock_kernel();
}
static int nilfs_sync_fs(struct super_block *sb, int wait)
struct nilfs_mount_options old_opts;
int was_snapshot, err;
- lock_kernel();
-
down_write(&nilfs->ns_super_sem);
old_sb_flags = sb->s_flags;
old_opts.mount_opt = sbi->s_mount_opt;
}
out:
up_write(&nilfs->ns_super_sem);
- unlock_kernel();
return 0;
restore_opts:
sbi->s_mount_opt = old_opts.mount_opt;
sbi->s_snapshot_cno = old_opts.snapshot_cno;
up_write(&nilfs->ns_super_sem);
- unlock_kernel();
return err;
}
if (!(flags & MS_RDONLY))
mode |= FMODE_WRITE;
- lock_kernel();
sd.bdev = open_bdev_exclusive(dev_name, mode, fs_type);
- if (IS_ERR(sd.bdev)) {
- unlock_kernel();
+ if (IS_ERR(sd.bdev))
return PTR_ERR(sd.bdev);
- }
/*
* To get mount instance using sget() vfs-routine, NILFS needs
if (need_to_close)
close_bdev_exclusive(sd.bdev, mode);
simple_set_mnt(mnt, s);
- unlock_kernel();
return 0;
failed_unlock:
put_nilfs(nilfs);
failed:
close_bdev_exclusive(sd.bdev, mode);
-
- unlock_kernel();
return err;
cancel_new:
* We must finish all post-cleaning before this call;
* put_nilfs() needs the block device.
*/
- unlock_kernel();
return err;
}