Commit 4be20808 authored by J. R. Okajima's avatar J. R. Okajima
Browse files

Merge branch 'aufs5.3/00base' into aufs5.4/00base


Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>

# Conflicts:
#	include/uapi/linux/aufs_type.h
parents d1406b69 0e58b612
......@@ -68,7 +68,7 @@ int au_dr_hino_test_add(struct au_dr_br *dr, ino_t ino,
found = 0;
idx = au_dr_ihash(ino);
hbl = dr->dr_h_ino + idx;
#if 0
#if 0 /* debug print */
{
struct hlist_bl_node *tmp;
......
......@@ -317,7 +317,7 @@ static ssize_t au_do_iter(struct file *h_file, int rw, struct kiocb *kio,
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;
......@@ -761,7 +761,7 @@ out:
/* ---------------------------------------------------------------------- */
/* 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)
{
......@@ -797,7 +797,7 @@ const struct file_operations aufs_file_fop = {
.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
......
......@@ -169,12 +169,6 @@ static int hn_gen_tree(struct dentry *dentry)
out_dpages:
au_dpages_free(&dpages);
#if 0
/* discard children */
dentry_unhash(dentry);
dput(dentry);
#endif
out:
return err;
}
......
......@@ -59,19 +59,6 @@ static int h_permission(struct inode *h_inode, int mask,
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;
}
......@@ -93,7 +80,13 @@ static int aufs_permission(struct inode *inode, int mask)
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;
......@@ -211,7 +204,7 @@ static struct dentry *aufs_lookup(struct inode *dir, struct dentry *dentry,
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;
......
......@@ -402,7 +402,7 @@ static int do_rename(struct au_ren_args *a)
}
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);
......
......@@ -199,7 +199,7 @@ static int set_inode(struct inode *inode, struct dentry *dentry)
struct dentry *h_dentry;
struct inode *h_inode;
struct au_iinfo *iinfo;
struct inode_operations *iop;
const struct inode_operations *iop;
IiMustWriteLock(inode);
......
......@@ -144,7 +144,7 @@ enum {
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 */
......
......@@ -1614,7 +1614,7 @@ int au_opts_verify(struct super_block *sb, unsigned long sb_flags,
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;
......
......@@ -233,7 +233,7 @@ static int aufs_show_options(struct seq_file *m, struct dentry *dentry)
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
......
......@@ -166,7 +166,7 @@ struct au_sbinfo {
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.
......
......@@ -21,6 +21,7 @@ static void sysrq_sb(struct super_block *sb)
struct hlist_bl_head *files;
struct hlist_bl_node *pos;
struct au_finfo *finfo;
struct inode *i;
plevel = au_plevel;
au_plevel = KERN_WARNING;
......@@ -33,14 +34,7 @@ static void sysrq_sb(struct super_block *sb)
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;
......@@ -61,21 +55,16 @@ static void sysrq_sb(struct super_block *sb)
} 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))
if (hlist_empty(&i->i_dentry))
au_dpri_inode(i);
spin_unlock(&i->i_lock);
}
spin_unlock(&sb->s_inode_list_lock);
}
#endif
pr("files\n");
files = &au_sbi(sb)->si_files;
hlist_bl_lock(files);
......
......@@ -82,7 +82,7 @@ int au_nhash_alloc(struct au_nhash *nhash, unsigned int num_hash, gfp_t gfp)
static void nhash_count(struct hlist_head *head)
{
#if 0
#if 0 /* debugging */
unsigned long n;
struct hlist_node *pos;
......
......@@ -292,7 +292,7 @@ static int test_linkable(struct dentry *h_root)
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? */
......
......@@ -140,8 +140,8 @@ static int au_wkq_lockdep_alloc(struct au_wkinfo *wkinfo)
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;
......@@ -218,7 +218,6 @@ static void wkq_func(struct work_struct *wk)
/*
* 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)
......@@ -237,25 +236,6 @@ static void au_wkq_comp_free(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)) {
......
......@@ -1342,7 +1342,7 @@ static void au_xino_release(struct kref *kref)
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);
}
......
......@@ -20,13 +20,13 @@
#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.4"
/* todo? move this to linux-2.6.19/include/magic.h */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment