the internal locks for LOCKDEP is necessary. LOCKDEP is a debugging
feature of linux kernel. If you enable CONFIG_LOCKDEP, then you will
need to apply this debug patch to expand several constant values.
- If don't know what LOCKDEP is, then you don't have apply this patch.
+ If you don't know what LOCKDEP is, then you don't have apply this
+ patch.
4. Usage
system, instead of the date you downloaded.
- configuration (define/undefine CONFIG_AUFS_xxx)
- kernel configuration or /proc/config.gz (if you have it)
+- LSM (linux security module, if you are using)
- behaviour which you think to be incorrect
- actual operation, reproducible one is better
- mailto: aufs-users at lists.sourceforge.net
-# Copyright (C) 2005-2019 Junjiro R. Okajima
+# Copyright (C) 2005-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Copyright (C) 2005-2019 Junjiro R. Okajima
+# Copyright (C) 2005-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Copyright (C) 2015-2019 Junjiro R. Okajima
+# Copyright (C) 2015-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Copyright (C) 2005-2019 Junjiro R. Okajima
+# Copyright (C) 2005-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Copyright (C) 2005-2019 Junjiro R. Okajima
+# Copyright (C) 2005-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Copyright (C) 2005-2019 Junjiro R. Okajima
+# Copyright (C) 2005-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Copyright (C) 2017-2019 Junjiro R. Okajima
+# Copyright (C) 2017-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Copyright (C) 2011-2019 Junjiro R. Okajima
+# Copyright (C) 2011-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Copyright (C) 2005-2019 Junjiro R. Okajima
+# Copyright (C) 2005-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Copyright (C) 2014-2019 Junjiro R. Okajima
+# Copyright (C) 2014-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Copyright (C) 2005-2019 Junjiro R. Okajima
+# Copyright (C) 2005-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Copyright (C) 2005-2019 Junjiro R. Okajima
+# Copyright (C) 2005-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# Copyright (C) 2010-2019 Junjiro R. Okajima
+# Copyright (C) 2010-2020 Junjiro R. Okajima
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
int (*ioctl)(struct loop_device *, int cmd,
unsigned long arg);
- struct file * lo_backing_file, *lo_backing_virt_file;
+ struct file *lo_backing_file, *lo_backing_virt_file;
struct block_device *lo_device;
void *key_data;
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2017-2019 Junjiro R. Okajima
+ * Copyright (C) 2017-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
found = 0;
idx = au_dr_ihash(ino);
hbl = dr->dr_h_ino + idx;
-#if 0
+#if 0 /* debug print */
{
struct hlist_bl_node *tmp;
err = 0;
if (!lkup->dirren.drinfo)
goto out;
- AuDebugOn(lkup->dirren.ninfo < btgt + 1);
- drinfo = lkup->dirren.drinfo[btgt + 1];
+ AuDebugOn(lkup->dirren.ninfo <= btgt);
+ drinfo = lkup->dirren.drinfo[btgt];
if (!drinfo)
goto out;
match = 1;
if (!lkup->dirren.drinfo)
goto out;
- AuDebugOn(lkup->dirren.ninfo < bindex + 1);
- drinfo = lkup->dirren.drinfo[bindex + 1];
+ AuDebugOn(lkup->dirren.ninfo <= bindex);
+ drinfo = lkup->dirren.drinfo[bindex];
if (!drinfo)
goto out;
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2017-2019 Junjiro R. Okajima
+ * Copyright (C) 2017-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2010-2019 Junjiro R. Okajima
+ * Copyright (C) 2010-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2010-2019 Junjiro R. Okajima
+ * Copyright (C) 2010-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
if (unlikely(err))
goto out;
- err = -ENOSYS;
+ err = -ENOSYS; /* the branch doesn't have its ->(read|write)_iter() */
iter = NULL;
if (rw == MAY_READ)
iter = h_file->f_op->read_iter;
/* ---------------------------------------------------------------------- */
/* no one supports this operation, currently */
-#if 0
+#if 0 /* reserved for future use */
static ssize_t aufs_sendpage(struct file *file, struct page *page, int offset,
size_t len, loff_t *pos, int more)
{
.setfl = aufs_setfl,
.splice_write = aufs_splice_write,
.splice_read = aufs_splice_read,
-#if 0
+#if 0 /* reserved for future use */
.aio_splice_write = aufs_aio_splice_write,
.aio_splice_read = aufs_aio_splice_read,
#endif
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2011-2019 Junjiro R. Okajima
+ * Copyright (C) 2011-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2017-2019 Junjiro R. Okajima
+ * Copyright (C) 2017-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2010-2019 Junjiro R. Okajima
+ * Copyright (C) 2010-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
out_dpages:
au_dpages_free(&dpages);
-
-#if 0
- /* discard children */
- dentry_unhash(dentry);
- dput(dentry);
-#endif
out:
return err;
}
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
if (!err)
err = security_inode_permission(h_inode, mask);
-#if 0
- if (!err) {
- /* todo: do we need to call ima_path_check()? */
- struct path h_path = {
- .dentry =
- .mnt = h_mnt
- };
- err = ima_path_check(&h_path,
- mask & (MAY_READ | MAY_WRITE | MAY_EXEC),
- IMA_COUNT_LEAVE);
- }
-#endif
-
out:
return err;
}
sb = inode->i_sb;
si_read_lock(sb, AuLock_FLUSH);
ii_read_lock_child(inode);
-#if 0
+#if 0 /* reserved for future use */
+ /*
+ * This test may be rather 'too much' since the test is essentially done
+ * in the aufs_lookup(). Theoretically it is possible that the inode
+ * generation doesn't match to the superblock's here. But it isn't a
+ * big deal I suppose.
+ */
err = au_iigen_test(inode, au_sigen(sb));
if (unlikely(err))
goto out;
if (inode)
atomic_inc(&inode->i_count);
ret = d_splice_alias(inode, dentry);
-#if 0
+#if 0 /* reserved for future use */
if (unlikely(d_need_lookup(dentry))) {
spin_lock(&dentry->d_lock);
dentry->d_flags &= ~DCACHE_NEED_LOOKUP;
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
}
BUG_ON(d_is_positive(a->dst_h_dentry) && a->src_btop != a->btgt);
-#if 0
+#if 0 /* debugging */
BUG_ON(!au_ftest_ren(a->auren_flags, DIRREN)
&& d_is_positive(a->dst_h_dentry)
&& a->src_btop != a->btgt);
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
struct dentry *h_dentry;
struct inode *h_inode;
struct au_iinfo *iinfo;
- struct inode_operations *iop;
+ const struct inode_operations *iop;
IiMustWriteLock(inode);
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
AuIop_OTHER,
AuIop_Last
};
-extern struct inode_operations aufs_iop[AuIop_Last],
+extern struct inode_operations aufs_iop[AuIop_Last], /* not const */
aufs_iop_nogetattr[AuIop_Last];
/* au_wr_dir flags */
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2018-2019 Junjiro R. Okajima
+ * Copyright (C) 2018-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2011-2019 Junjiro R. Okajima
+ * Copyright (C) 2011-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
if ((br->br_perm & AuBrAttr_ICEX)
&& !h_dir->i_op->listxattr)
br->br_perm &= ~AuBrAttr_ICEX;
-#if 0
+#if 0 /* untested */
if ((br->br_perm & AuBrAttr_ICEX_SEC)
&& (au_br_sb(br)->s_flags & SB_NOSEC))
br->br_perm &= ~AuBrAttr_ICEX_SEC;
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2014-2019 Junjiro R. Okajima
+ * Copyright (C) 2014-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2010-2019 Junjiro R. Okajima
+ * Copyright (C) 2010-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
sb = dentry->d_sb;
if (sb->s_flags & SB_POSIXACL)
seq_puts(m, ",acl");
-#if 0
+#if 0 /* reserved for future use */
if (sb->s_flags & SB_I_VERSION)
seq_puts(m, ",i_version");
#endif
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
struct hlist_bl_head si_files;
/* with/without getattr, brother of sb->s_d_op */
- struct inode_operations *si_iop_array;
+ const struct inode_operations *si_iop_array;
/*
* sysfs and lifetime management.
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
struct hlist_bl_head *files;
struct hlist_bl_node *pos;
struct au_finfo *finfo;
+ struct inode *i;
plevel = au_plevel;
au_plevel = KERN_WARNING;
pr("superblock\n");
au_dpri_sb(sb);
-#if 0
- pr("root dentry\n");
- au_dpri_dentry(sb->s_root);
- pr("root inode\n");
- au_dpri_inode(d_inode(sb->s_root));
-#endif
-
-#if 0
+#if 0 /* reserved */
do {
int err, i, j, ndentry;
struct au_dcsub_pages dpages;
} while (0);
#endif
-#if 1
- {
- struct inode *i;
-
- pr("isolated inode\n");
- spin_lock(&sb->s_inode_list_lock);
- list_for_each_entry(i, &sb->s_inodes, i_sb_list) {
- spin_lock(&i->i_lock);
- if (1 || hlist_empty(&i->i_dentry))
- au_dpri_inode(i);
- spin_unlock(&i->i_lock);
- }
- spin_unlock(&sb->s_inode_list_lock);
+ pr("isolated inode\n");
+ spin_lock(&sb->s_inode_list_lock);
+ list_for_each_entry(i, &sb->s_inodes, i_sb_list) {
+ spin_lock(&i->i_lock);
+ if (hlist_empty(&i->i_dentry))
+ au_dpri_inode(i);
+ spin_unlock(&i->i_lock);
}
-#endif
+ spin_unlock(&sb->s_inode_list_lock);
+
pr("files\n");
files = &au_sbi(sb)->si_files;
hlist_bl_lock(files);
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static void nhash_count(struct hlist_head *head)
{
-#if 0
+#if 0 /* debugging */
unsigned long n;
struct hlist_node *pos;
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
pr_err("%pd (%s) doesn't support link(2), use noplink and rw+nolwh\n",
h_root, au_sbtype(h_root->d_sb));
- return -ENOSYS;
+ return -ENOSYS; /* the branch doesn't have its ->link() */
}
/* todo: should this mkdir be done in /sbin/mount.aufs helper? */
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
goto out;
err = 0;
-#if 0
- if (0 && au_debug_test()) /* left for debugging */
+#if 0 /* left for debugging */
+ if (0 && au_debug_test())
lockdep_print_held_locks(curr);
#endif
held_locks = curr->held_locks;
/*
* Since struct completion is large, try allocating it dynamically.
*/
-#if 1 /* defined(CONFIG_4KSTACKS) || defined(AuTest4KSTACKS) */
#define AuWkqCompDeclare(name) struct completion *comp = NULL
static int au_wkq_comp_alloc(struct au_wkinfo *wkinfo, struct completion **comp)
au_kfree_rcu(comp);
}
-#else
-
-/* no braces */
-#define AuWkqCompDeclare(name) \
- DECLARE_COMPLETION_ONSTACK(_ ## name); \
- struct completion *comp = &_ ## name
-
-static int au_wkq_comp_alloc(struct au_wkinfo *wkinfo, struct completion **comp)
-{
- wkinfo->comp = *comp;
- return 0;
-}
-
-static void au_wkq_comp_free(struct completion *comp __maybe_unused)
-{
- /* empty */
-}
-#endif /* 4KSTACKS */
-
static void au_wkq_run(struct au_wkinfo *wkinfo)
{
if (au_ftest_wkq(wkinfo->flags, NEST)) {
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2014-2019 Junjiro R. Okajima
+ * Copyright (C) 2014-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
if (unlikely(ul)) {
pr_warn("xi_writing %lu\n", ul);
hlist_bl_lock(hbl);
- hlist_bl_for_each_entry_safe (p, pos, n, hbl, node) {
+ hlist_bl_for_each_entry_safe(p, pos, n, hbl, node) {
hlist_bl_del(&p->node);
- au_kfree_rcu(p);
+ /* kmemleak reported au_kfree_rcu() doesn't free it */
+ kfree(p);
}
hlist_bl_unlock(hbl);
}
#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
-int setfl(int fd, struct file * filp, unsigned long arg)
+int setfl(int fd, struct file *filp, unsigned long arg)
{
struct inode * inode = file_inode(filp);
int error = 0;
return fop->read;
if (fop->read_iter)
return new_sync_read;
- return ERR_PTR(-ENOSYS);
+ return ERR_PTR(-ENOSYS); /* doesn't have ->read(|_iter)() op */
}
EXPORT_SYMBOL_GPL(vfs_readf);
return fop->write;
if (fop->write_iter)
return new_sync_write;
- return ERR_PTR(-ENOSYS);
+ return ERR_PTR(-ENOSYS); /* doesn't have ->write(|_iter)() op */
}
EXPORT_SYMBOL_GPL(vfs_writef);
/* can be called from interrupts */
extern void kill_fasync(struct fasync_struct **, int, int);
-extern int setfl(int fd, struct file * filp, unsigned long arg);
+extern int setfl(int fd, struct file *filp, unsigned long arg);
extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
extern int f_setown(struct file *filp, unsigned long arg, int force);
extern void f_delown(struct file *filp);
struct shrink_control *);
long (*free_cached_objects)(struct super_block *,
struct shrink_control *);
-#if defined(CONFIG_BLK_DEV_LOOP) || defined(CONFIG_BLK_DEV_LOOP_MODULE)
+#if IS_ENABLED(CONFIG_BLK_DEV_LOOP) || IS_ENABLED(CONFIG_BLK_DEV_LOOP_MODULE)
/* and aufs */
struct file *(*real_loop)(struct file *);
#endif
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
- * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * Copyright (C) 2005-2020 Junjiro R. Okajima
*
* This program, aufs is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#define pr_fmt(fmt) \
AUFS_NAME " %s:%d:%.*s[%d]: " fmt, __func__, __LINE__, \
(int)sizeof(current->comm), current->comm, current->pid
+#include <linux/limits.h>
#else
#include <stdint.h>
#include <sys/types.h>
+#include <limits.h>
#endif /* __KERNEL__ */
-#include <linux/limits.h>
-
-#define AUFS_VERSION "5.x-rcN-20191021"
+#define AUFS_VERSION "5.4.3-20200302"
/* todo? move this to linux-2.6.19/include/magic.h */
#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
/* ---------------------------------------------------------------------- */
+#ifdef __KERNEL__
#ifdef CONFIG_AUFS_BRANCH_MAX_127
typedef int8_t aufs_bindex_t;
#define AUFS_BRANCH_MAX 127
#endif
#endif
-#ifdef __KERNEL__
#ifndef AUFS_BRANCH_MAX
#error unknown CONFIG_AUFS_BRANCH_MAX value
#endif
*
* See Documentation/filesystems/aufs/design/06mmap.txt
*
- * Copyright (c) 2014-2019 Junjro R. Okajima
+ * Copyright (c) 2014-2020 Junjro R. Okajima
* Copyright (c) 2014 Ian Campbell
*/
struct shmem_options {
unsigned long long blocks;
- unsigned long long inodes;
+ int inodes;
struct mempolicy *mpol;
kuid_t uid;
kgid_t gid;
#else
sb->s_flags |= SB_NOUSER;
#endif
+ mutex_init(&sbinfo->idr_lock);
+ idr_init(&sbinfo->idr);
sbinfo->max_blocks = ctx->blocks;
sbinfo->free_inodes = sbinfo->max_inodes = ctx->inodes;
sbinfo->uid = ctx->uid;
sbinfo->mpol = ctx->mpol;
ctx->mpol = NULL;
- mutex_init(&sbinfo->idr_lock);
- idr_init(&sbinfo->idr);
-
spin_lock_init(&sbinfo->stat_lock);
if (percpu_counter_init(&sbinfo->used_blocks, 0, GFP_KERNEL))
goto failed;