Merge pull request #11 from BitExplorer/master

added initialization of a variable
This commit is contained in:
Sankar சங்கர் 2019-10-27 08:10:33 +05:30 committed by GitHub
commit 451cb1bb73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ static struct kmem_cache *sfs_inode_cachep;
void simplefs_sb_sync(struct super_block *vsb) void simplefs_sb_sync(struct super_block *vsb)
{ {
struct buffer_head *bh; struct buffer_head *bh = NULL;
struct simplefs_super_block *sb = SIMPLEFS_SB(vsb); struct simplefs_super_block *sb = SIMPLEFS_SB(vsb);
bh = sb_bread(vsb, SIMPLEFS_SUPERBLOCK_BLOCK_NUMBER); bh = sb_bread(vsb, SIMPLEFS_SUPERBLOCK_BLOCK_NUMBER);
@ -76,8 +76,8 @@ struct simplefs_inode *simplefs_inode_search(struct super_block *sb,
void simplefs_inode_add(struct super_block *vsb, struct simplefs_inode *inode) void simplefs_inode_add(struct super_block *vsb, struct simplefs_inode *inode)
{ {
struct simplefs_super_block *sb = SIMPLEFS_SB(vsb); struct simplefs_super_block *sb = SIMPLEFS_SB(vsb);
struct buffer_head *bh; struct buffer_head *bh = NULL;
struct simplefs_inode *inode_iterator; struct simplefs_inode *inode_iterator = NULL;
if (mutex_lock_interruptible(&simplefs_inodes_mgmt_lock)) { if (mutex_lock_interruptible(&simplefs_inodes_mgmt_lock)) {
sfs_trace("Failed to acquire mutex lock\n"); sfs_trace("Failed to acquire mutex lock\n");