Skip to content

Commit bb7720a

Browse files
committed
udf: Fold udf_fill_inode() into __udf_read_inode()
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 <jack@suse.cz>
1 parent 8a70ee3 commit bb7720a

1 file changed

Lines changed: 5 additions & 17 deletions

File tree

‎fs/udf/inode.c‎

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ MODULE_LICENSE("GPL");
5151

5252
static umode_t udf_convert_permissions(struct fileEntry *);
5353
static int udf_update_inode(struct inode *, int);
54-
static void udf_fill_inode(struct inode *, struct buffer_head *);
5554
static int udf_sync_inode(struct inode *inode);
5655
static int udf_alloc_i_data(struct inode *inode, size_t size);
5756
static sector_t inode_getblk(struct inode *, sector_t, int *, int *);
@@ -1275,8 +1274,11 @@ static void __udf_read_inode(struct inode *inode)
12751274
{
12761275
struct buffer_head *bh = NULL;
12771276
struct fileEntry *fe;
1277+
struct extendedFileEntry *efe;
12781278
uint16_t ident;
12791279
struct udf_inode_info *iinfo = UDF_I(inode);
1280+
struct udf_sb_info *sbi = UDF_SB(inode->i_sb);
1281+
unsigned int link_count;
12801282

12811283
/*
12821284
* Set defaults, but the inode is still incomplete!
@@ -1307,6 +1309,7 @@ static void __udf_read_inode(struct inode *inode)
13071309
}
13081310

13091311
fe = (struct fileEntry *)bh->b_data;
1312+
efe = (struct extendedFileEntry *)bh->b_data;
13101313

13111314
if (fe->icbTag.strategyType == cpu_to_le16(4096)) {
13121315
struct buffer_head *ibh;
@@ -1346,22 +1349,6 @@ static void __udf_read_inode(struct inode *inode)
13461349
make_bad_inode(inode);
13471350
return;
13481351
}
1349-
udf_fill_inode(inode, bh);
1350-
1351-
brelse(bh);
1352-
}
1353-
1354-
static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
1355-
{
1356-
struct fileEntry *fe;
1357-
struct extendedFileEntry *efe;
1358-
struct udf_sb_info *sbi = UDF_SB(inode->i_sb);
1359-
struct udf_inode_info *iinfo = UDF_I(inode);
1360-
unsigned int link_count;
1361-
1362-
fe = (struct fileEntry *)bh->b_data;
1363-
efe = (struct extendedFileEntry *)bh->b_data;
1364-
13651352
if (fe->icbTag.strategyType == cpu_to_le16(4))
13661353
iinfo->i_strat4096 = 0;
13671354
else /* if (fe->icbTag.strategyType == cpu_to_le16(4096)) */
@@ -1551,6 +1538,7 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
15511538
} else
15521539
make_bad_inode(inode);
15531540
}
1541+
brelse(bh);
15541542
}
15551543

15561544
static int udf_alloc_i_data(struct inode *inode, size_t size)

0 commit comments

Comments
 (0)