summaryrefslogtreecommitdiff
path: root/fs/aufs/super.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-06-10 05:30:17 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-06-10 05:30:17 -0300
commitd635711daa98be86d4c7fd01499c34f566b54ccb (patch)
treeaa5cc3760a27c3d57146498cb82fa549547de06c /fs/aufs/super.c
parentc91265cd0efb83778f015b4d4b1129bd2cfd075e (diff)
Linux-libre 4.6.2-gnu
Diffstat (limited to 'fs/aufs/super.c')
-rw-r--r--fs/aufs/super.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/aufs/super.c b/fs/aufs/super.c
index 7928a5031..18190aa5f 100644
--- a/fs/aufs/super.c
+++ b/fs/aufs/super.c
@@ -23,7 +23,6 @@ static struct inode *aufs_alloc_inode(struct super_block *sb __maybe_unused)
if (c) {
au_icntnr_init(c);
c->vfs_inode.i_version = 1; /* sigen(sb); */
- c->iinfo.ii_hinode = NULL;
return &c->vfs_inode;
}
return NULL;
@@ -39,7 +38,8 @@ static void aufs_destroy_inode_cb(struct rcu_head *head)
static void aufs_destroy_inode(struct inode *inode)
{
- au_iinfo_fin(inode);
+ if (!is_bad_inode(inode))
+ au_iinfo_fin(inode);
call_rcu(&inode->i_rcu, aufs_destroy_inode_cb);
}
@@ -77,16 +77,16 @@ out:
static int au_show_brs(struct seq_file *seq, struct super_block *sb)
{
int err;
- aufs_bindex_t bindex, bend;
+ aufs_bindex_t bindex, bbot;
struct path path;
struct au_hdentry *hdp;
struct au_branch *br;
au_br_perm_str_t perm;
err = 0;
- bend = au_sbend(sb);
+ bbot = au_sbbot(sb);
hdp = au_di(sb->s_root)->di_hdentry;
- for (bindex = 0; !err && bindex <= bend; bindex++) {
+ for (bindex = 0; !err && bindex <= bbot; bindex++) {
br = au_sbr(sb, bindex);
path.mnt = au_br_mnt(br);
path.dentry = hdp[bindex].hd_dentry;
@@ -94,7 +94,7 @@ static int au_show_brs(struct seq_file *seq, struct super_block *sb)
if (!err) {
au_optstr_br_perm(&perm, br->br_perm);
seq_printf(seq, "=%s", perm.a);
- if (bindex != bend)
+ if (bindex != bbot)
seq_putc(seq, ':');
}
}
@@ -318,7 +318,7 @@ static int au_statfs_sum(struct super_block *sb, struct kstatfs *buf)
int err;
long bsize, factor;
u64 blocks, bfree, bavail, files, ffree;
- aufs_bindex_t bend, bindex, i;
+ aufs_bindex_t bbot, bindex, i;
unsigned char shared;
struct path h_path;
struct super_block *h_sb;
@@ -330,8 +330,8 @@ static int au_statfs_sum(struct super_block *sb, struct kstatfs *buf)
blocks = 0;
bfree = 0;
bavail = 0;
- bend = au_sbend(sb);
- for (bindex = 0; bindex <= bend; bindex++) {
+ bbot = au_sbbot(sb);
+ for (bindex = 0; bindex <= bbot; bindex++) {
h_path.mnt = au_sbr_mnt(sb, bindex);
h_sb = h_path.mnt->mnt_sb;
shared = 0;
@@ -414,14 +414,14 @@ static int aufs_statfs(struct dentry *dentry, struct kstatfs *buf)
static int aufs_sync_fs(struct super_block *sb, int wait)
{
int err, e;
- aufs_bindex_t bend, bindex;
+ aufs_bindex_t bbot, bindex;
struct au_branch *br;
struct super_block *h_sb;
err = 0;
si_noflush_read_lock(sb);
- bend = au_sbend(sb);
- for (bindex = 0; bindex <= bend; bindex++) {
+ bbot = au_sbbot(sb);
+ for (bindex = 0; bindex <= bbot; bindex++) {
br = au_sbr(sb, bindex);
if (!au_br_writable(br->br_perm))
continue;
@@ -504,7 +504,7 @@ static unsigned long long au_iarray_cb(struct super_block *sb, void *a,
spin_lock(&sb->s_inode_list_lock);
list_for_each_entry(inode, head, i_sb_list) {
if (!is_bad_inode(inode)
- && au_ii(inode)->ii_bstart >= 0) {
+ && au_ii(inode)->ii_btop >= 0) {
spin_lock(&inode->i_lock);
if (atomic_read(&inode->i_count)) {
au_igrab(inode);
@@ -522,7 +522,7 @@ static unsigned long long au_iarray_cb(struct super_block *sb, void *a,
struct inode **au_iarray_alloc(struct super_block *sb, unsigned long long *max)
{
- *max = atomic_long_read(&au_sbi(sb)->si_ninodes);
+ *max = au_ninodes(sb);
return au_array_alloc(max, au_iarray_cb, sb, &sb->s_inodes);
}
@@ -681,7 +681,7 @@ static void au_remount_refresh(struct super_block *sb, unsigned int do_idop)
{
int err, e;
unsigned int udba;
- aufs_bindex_t bindex, bend;
+ aufs_bindex_t bindex, bbot;
struct dentry *root;
struct inode *inode;
struct au_branch *br;
@@ -697,8 +697,8 @@ static void au_remount_refresh(struct super_block *sb, unsigned int do_idop)
IiMustNoWaiters(inode);
udba = au_opt_udba(sb);
- bend = au_sbend(sb);
- for (bindex = 0; bindex <= bend; bindex++) {
+ bbot = au_sbbot(sb);
+ for (bindex = 0; bindex <= bbot; bindex++) {
br = au_sbr(sb, bindex);
err = au_hnotify_reset_br(udba, br, br->br_perm);
if (unlikely(err))