diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-06-27 21:01:09 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-06-27 21:01:09 -0300 |
commit | b907a8622e39eecfc4b243f3be3ad26559d1faee (patch) | |
tree | b99ead386fccde5ea8252b5b5ebff8ffd83cd03d /fs/aufs/iinfo.c | |
parent | 68f052d01b53b858897d80beb0095920abe5868e (diff) |
Linux-libre 4.6.3-gnupck-4.6.3-gnu
Diffstat (limited to 'fs/aufs/iinfo.c')
-rw-r--r-- | fs/aufs/iinfo.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/fs/aufs/iinfo.c b/fs/aufs/iinfo.c index 3a10d8f13..fae4c2795 100644 --- a/fs/aufs/iinfo.c +++ b/fs/aufs/iinfo.c @@ -122,7 +122,7 @@ void au_update_ibrange(struct inode *inode, int do_put_zero) struct au_iinfo *iinfo; aufs_bindex_t bindex, bbot; - AuDebugOn(is_bad_inode(inode)); + AuDebugOn(au_is_bad_inode(inode)); IiMustWriteLock(inode); iinfo = au_ii(inode); @@ -180,6 +180,7 @@ int au_iinfo_init(struct inode *inode) { struct au_iinfo *iinfo; struct super_block *sb; + struct au_hinode *hi; int nbr, i; sb = inode->i_sb; @@ -187,12 +188,13 @@ int au_iinfo_init(struct inode *inode) nbr = au_sbbot(sb) + 1; if (unlikely(nbr <= 0)) nbr = 1; - iinfo->ii_hinode = kmalloc_array(nbr, sizeof(*iinfo->ii_hinode), - GFP_NOFS); - if (iinfo->ii_hinode) { + hi = kmalloc_array(nbr, sizeof(*iinfo->ii_hinode), GFP_NOFS); + if (hi) { au_ninodes_inc(sb); - for (i = 0; i < nbr; i++) - au_hinode_init(iinfo->ii_hinode + i); + + iinfo->ii_hinode = hi; + for (i = 0; i < nbr; i++, hi++) + au_hinode_init(hi); iinfo->ii_generation.ig_generation = au_sigen(sb); iinfo->ii_btop = -1; @@ -213,9 +215,11 @@ int au_hinode_realloc(struct au_iinfo *iinfo, int nbr) err = -ENOMEM; hip = krealloc(iinfo->ii_hinode, sizeof(*hip) * nbr, GFP_NOFS); if (hip) { - for (i = iinfo->ii_bbot + 1; i < nbr; i++) - au_hinode_init(hip + i); iinfo->ii_hinode = hip; + i = iinfo->ii_bbot + 1; + hip += i; + for (; i < nbr; i++, hip++) + au_hinode_init(hip); err = 0; } @@ -230,7 +234,7 @@ void au_iinfo_fin(struct inode *inode) aufs_bindex_t bindex, bbot; const unsigned char unlinked = !inode->i_nlink; - AuDebugOn(is_bad_inode(inode)); + AuDebugOn(au_is_bad_inode(inode)); sb = inode->i_sb; au_ninodes_dec(sb); |