Skip to content

Commit

Permalink
udf: Fold udf_fill_inode() into __udf_read_inode()
Browse files Browse the repository at this point in the history
There's no good reason to separate these since udf_fill_inode() is
called only from __udf_read_inode() and both do part of the same thing.

Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
jankara committed Sep 4, 2014
1 parent 8a70ee3 commit bb7720a
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions fs/udf/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ MODULE_LICENSE("GPL");

static umode_t udf_convert_permissions(struct fileEntry *);
static int udf_update_inode(struct inode *, int);
static void udf_fill_inode(struct inode *, struct buffer_head *);
static int udf_sync_inode(struct inode *inode);
static int udf_alloc_i_data(struct inode *inode, size_t size);
static sector_t inode_getblk(struct inode *, sector_t, int *, int *);
Expand Down Expand Up @@ -1275,8 +1274,11 @@ static void __udf_read_inode(struct inode *inode)
{
struct buffer_head *bh = NULL;
struct fileEntry *fe;
struct extendedFileEntry *efe;
uint16_t ident;
struct udf_inode_info *iinfo = UDF_I(inode);
struct udf_sb_info *sbi = UDF_SB(inode->i_sb);
unsigned int link_count;

/*
* Set defaults, but the inode is still incomplete!
Expand Down Expand Up @@ -1307,6 +1309,7 @@ static void __udf_read_inode(struct inode *inode)
}

fe = (struct fileEntry *)bh->b_data;
efe = (struct extendedFileEntry *)bh->b_data;

if (fe->icbTag.strategyType == cpu_to_le16(4096)) {
struct buffer_head *ibh;
Expand Down Expand Up @@ -1346,22 +1349,6 @@ static void __udf_read_inode(struct inode *inode)
make_bad_inode(inode);
return;
}
udf_fill_inode(inode, bh);

brelse(bh);
}

static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
{
struct fileEntry *fe;
struct extendedFileEntry *efe;
struct udf_sb_info *sbi = UDF_SB(inode->i_sb);
struct udf_inode_info *iinfo = UDF_I(inode);
unsigned int link_count;

fe = (struct fileEntry *)bh->b_data;
efe = (struct extendedFileEntry *)bh->b_data;

if (fe->icbTag.strategyType == cpu_to_le16(4))
iinfo->i_strat4096 = 0;
else /* if (fe->icbTag.strategyType == cpu_to_le16(4096)) */
Expand Down Expand Up @@ -1551,6 +1538,7 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
} else
make_bad_inode(inode);
}
brelse(bh);
}

static int udf_alloc_i_data(struct inode *inode, size_t size)
Expand Down

0 comments on commit bb7720a

Please sign in to comment.