#include <linux/slab.h>
#include <linux/init.h>
#include <linux/fs.h>
-#include <linux/smp_lock.h>
#include <linux/buffer_head.h>
#include <linux/vfs.h>
#include <linux/writeback.h>
if (!info)
return;
- lock_kernel();
-
mutex_destroy(&info->bfs_lock);
kfree(info->si_imap);
kfree(info);
s->s_fs_info = NULL;
-
- unlock_kernel();
}
static int bfs_statfs(struct dentry *dentry, struct kstatfs *buf)
int ret = -EINVAL;
unsigned long i_sblock, i_eblock, i_eoff, s_size;
- lock_kernel();
-
info = kzalloc(sizeof(*info), GFP_KERNEL);
- if (!info) {
- unlock_kernel();
+ if (!info)
return -ENOMEM;
- }
mutex_init(&info->bfs_lock);
s->s_fs_info = info;
brelse(bh);
brelse(sbh);
dump_imap("read_super", s);
- unlock_kernel();
return 0;
out3:
mutex_destroy(&info->bfs_lock);
kfree(info);
s->s_fs_info = NULL;
- unlock_kernel();
return ret;
}