cregit-Linux how code gets into the kernel

Release 4.10 fs/udf/ialloc.c

Directory: fs/udf
 * ialloc.c
 *      Inode allocation handling routines for the OSTA-UDF(tm) filesystem.
 *      This file is distributed under the terms of the GNU General Public
 *      License (GPL). Copies of the GPL can be obtained from:
 *      Each contributing author retains all rights to their own work.
 *  (C) 1998-2001 Ben Fennema
 *  02/24/99 blf  Created.

#include "udfdecl.h"
#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/slab.h>

#include "udf_i.h"
#include "udf_sb.h"

void udf_free_inode(struct inode *inode) { struct super_block *sb = inode->i_sb; struct udf_sb_info *sbi = UDF_SB(sb); struct logicalVolIntegrityDescImpUse *lvidiu = udf_sb_lvidiu(sb); if (lvidiu) { mutex_lock(&sbi->s_alloc_mutex); if (S_ISDIR(inode->i_mode)) le32_add_cpu(&lvidiu->numDirs, -1); else le32_add_cpu(&lvidiu->numFiles, -1); udf_updated_lvid(sb); mutex_unlock(&sbi->s_alloc_mutex); } udf_free_blocks(sb, NULL, &UDF_I(inode)->i_location, 0, 1); }


marcin slusarzmarcin slusarz2017.09%330.00%
christoph hellwigchristoph hellwig1815.38%110.00%
jan karajan kara1714.53%220.00%
linus torvaldslinus torvalds32.56%110.00%
ingo molnaringo molnar21.71%110.00%
pekka j enbergpekka j enberg10.85%110.00%

struct inode *udf_new_inode(struct inode *dir, umode_t mode) { struct super_block *sb = dir->i_sb; struct udf_sb_info *sbi = UDF_SB(sb); struct inode *inode; int block; uint32_t start = UDF_I(dir)->i_location.logicalBlockNum; struct udf_inode_info *iinfo; struct udf_inode_info *dinfo = UDF_I(dir); struct logicalVolIntegrityDescImpUse *lvidiu; int err; inode = new_inode(sb); if (!inode) return ERR_PTR(-ENOMEM); iinfo = UDF_I(inode); if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_EXTENDED_FE)) { iinfo->i_efe = 1; if (UDF_VERS_USE_EXTENDED_FE > sbi->s_udfrev) sbi->s_udfrev = UDF_VERS_USE_EXTENDED_FE; iinfo->i_ext.i_data = kzalloc(inode->i_sb->s_blocksize - sizeof(struct extendedFileEntry), GFP_KERNEL); } else { iinfo->i_efe = 0; iinfo->i_ext.i_data = kzalloc(inode->i_sb->s_blocksize - sizeof(struct fileEntry), GFP_KERNEL); } if (!iinfo->i_ext.i_data) { iput(inode); return ERR_PTR(-ENOMEM); } err = -ENOSPC; block = udf_new_block(dir->i_sb, NULL, dinfo->i_location.partitionReferenceNum, start, &err); if (err) { iput(inode); return ERR_PTR(err); } lvidiu = udf_sb_lvidiu(sb); if (lvidiu) { iinfo->i_unique = lvid_get_unique_id(sb); inode->i_generation = iinfo->i_unique; mutex_lock(&sbi->s_alloc_mutex); if (S_ISDIR(mode)) le32_add_cpu(&lvidiu->numDirs, 1); else le32_add_cpu(&lvidiu->numFiles, 1); udf_updated_lvid(sb); mutex_unlock(&sbi->s_alloc_mutex); } inode_init_owner(inode, dir, mode); iinfo->i_location.logicalBlockNum = block; iinfo->i_location.partitionReferenceNum = dinfo->i_location.partitionReferenceNum; inode->i_ino = udf_get_lb_pblock(sb, &iinfo->i_location, 0); inode->i_blocks = 0; iinfo->i_lenEAttr = 0; iinfo->i_lenAlloc = 0; iinfo->i_use = 0; iinfo->i_checkpoint = 1; if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_AD_IN_ICB)) iinfo->i_alloc_type = ICBTAG_FLAG_AD_IN_ICB; else if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD)) iinfo->i_alloc_type = ICBTAG_FLAG_AD_SHORT; else iinfo->i_alloc_type = ICBTAG_FLAG_AD_LONG; inode->i_mtime = inode->i_atime = inode->i_ctime = iinfo->i_crtime = current_time(inode); if (unlikely(insert_inode_locked(inode) < 0)) { make_bad_inode(inode); iput(inode); return ERR_PTR(-EIO); } mark_inode_dirty(inode); return inode; }


jan karajan kara13526.26%622.22%
marcin slusarzmarcin slusarz7815.18%414.81%
al viroal viro499.53%311.11%
christoph hellwigchristoph hellwig142.72%13.70%
eric sandeeneric sandeen122.33%13.70%
ben fennemaben fennema71.36%27.41%
steve nickelsteve nickel61.17%13.70%
linus torvaldslinus torvalds50.97%27.41%
dmitriy monakhovdmitriy monakhov40.78%13.70%
andi kleenandi kleen30.58%13.70%
deepa dinamanideepa dinamani10.19%13.70%
pekka j enbergpekka j enberg10.19%13.70%

Overall Contributors

jan karajan kara15223.38%620.00%
marcin slusarzmarcin slusarz9815.08%413.33%
al viroal viro497.54%310.00%
christoph hellwigchristoph hellwig355.38%26.67%
eric sandeeneric sandeen121.85%13.33%
ben fennemaben fennema101.54%26.67%
linus torvaldslinus torvalds81.23%26.67%
steve nickelsteve nickel60.92%13.33%
dmitriy monakhovdmitriy monakhov40.62%13.33%
andi kleenandi kleen30.46%13.33%
pekka j enbergpekka j enberg20.31%13.33%
ingo molnaringo molnar20.31%13.33%
adrian bunkadrian bunk10.15%13.33%
deepa dinamanideepa dinamani10.15%13.33%
Directory: fs/udf
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.