Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Aufs5 Standalone
Commits
178371bc
Commit
178371bc
authored
Jan 16, 2020
by
J. R. Okajima
Browse files
Merge branch 'aufs5.0/00base' into aufs5.0/01modular
parents
92d171d4
96a34870
Changes
16
Hide whitespace changes
Inline
Side-by-side
fs/aufs/dirren.c
View file @
178371bc
...
@@ -68,7 +68,7 @@ int au_dr_hino_test_add(struct au_dr_br *dr, ino_t ino,
...
@@ -68,7 +68,7 @@ int au_dr_hino_test_add(struct au_dr_br *dr, ino_t ino,
found
=
0
;
found
=
0
;
idx
=
au_dr_ihash
(
ino
);
idx
=
au_dr_ihash
(
ino
);
hbl
=
dr
->
dr_h_ino
+
idx
;
hbl
=
dr
->
dr_h_ino
+
idx
;
#if 0
#if 0
/* debug print */
{
{
struct hlist_bl_node *tmp;
struct hlist_bl_node *tmp;
...
...
fs/aufs/f_op.c
View file @
178371bc
...
@@ -317,7 +317,7 @@ static ssize_t au_do_iter(struct file *h_file, int rw, struct kiocb *kio,
...
@@ -317,7 +317,7 @@ static ssize_t au_do_iter(struct file *h_file, int rw, struct kiocb *kio,
if
(
unlikely
(
err
))
if
(
unlikely
(
err
))
goto
out
;
goto
out
;
err
=
-
ENOSYS
;
err
=
-
ENOSYS
;
/* the branch doesn't have its ->(read|write)_iter() */
iter
=
NULL
;
iter
=
NULL
;
if
(
rw
==
MAY_READ
)
if
(
rw
==
MAY_READ
)
iter
=
h_file
->
f_op
->
read_iter
;
iter
=
h_file
->
f_op
->
read_iter
;
...
@@ -761,7 +761,7 @@ out:
...
@@ -761,7 +761,7 @@ out:
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */
/* no one supports this operation, currently */
/* 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,
static ssize_t aufs_sendpage(struct file *file, struct page *page, int offset,
size_t len, loff_t *pos, int more)
size_t len, loff_t *pos, int more)
{
{
...
@@ -797,7 +797,7 @@ const struct file_operations aufs_file_fop = {
...
@@ -797,7 +797,7 @@ const struct file_operations aufs_file_fop = {
.
setfl
=
aufs_setfl
,
.
setfl
=
aufs_setfl
,
.
splice_write
=
aufs_splice_write
,
.
splice_write
=
aufs_splice_write
,
.
splice_read
=
aufs_splice_read
,
.
splice_read
=
aufs_splice_read
,
#if 0
#if 0
/* reserved for future use */
.aio_splice_write = aufs_aio_splice_write,
.aio_splice_write = aufs_aio_splice_write,
.aio_splice_read = aufs_aio_splice_read,
.aio_splice_read = aufs_aio_splice_read,
#endif
#endif
...
...
fs/aufs/hnotify.c
View file @
178371bc
...
@@ -169,12 +169,6 @@ static int hn_gen_tree(struct dentry *dentry)
...
@@ -169,12 +169,6 @@ static int hn_gen_tree(struct dentry *dentry)
out_dpages:
out_dpages:
au_dpages_free
(
&
dpages
);
au_dpages_free
(
&
dpages
);
#if 0
/* discard children */
dentry_unhash(dentry);
dput(dentry);
#endif
out:
out:
return
err
;
return
err
;
}
}
...
...
fs/aufs/i_op.c
View file @
178371bc
...
@@ -59,19 +59,6 @@ static int h_permission(struct inode *h_inode, int mask,
...
@@ -59,19 +59,6 @@ static int h_permission(struct inode *h_inode, int mask,
if
(
!
err
)
if
(
!
err
)
err
=
security_inode_permission
(
h_inode
,
mask
);
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:
out:
return
err
;
return
err
;
}
}
...
@@ -93,7 +80,13 @@ static int aufs_permission(struct inode *inode, int mask)
...
@@ -93,7 +80,13 @@ static int aufs_permission(struct inode *inode, int mask)
sb
=
inode
->
i_sb
;
sb
=
inode
->
i_sb
;
si_read_lock
(
sb
,
AuLock_FLUSH
);
si_read_lock
(
sb
,
AuLock_FLUSH
);
ii_read_lock_child
(
inode
);
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));
err = au_iigen_test(inode, au_sigen(sb));
if (unlikely(err))
if (unlikely(err))
goto out;
goto out;
...
@@ -211,7 +204,7 @@ static struct dentry *aufs_lookup(struct inode *dir, struct dentry *dentry,
...
@@ -211,7 +204,7 @@ static struct dentry *aufs_lookup(struct inode *dir, struct dentry *dentry,
if
(
inode
)
if
(
inode
)
atomic_inc
(
&
inode
->
i_count
);
atomic_inc
(
&
inode
->
i_count
);
ret
=
d_splice_alias
(
inode
,
dentry
);
ret
=
d_splice_alias
(
inode
,
dentry
);
#if 0
#if 0
/* reserved for future use */
if (unlikely(d_need_lookup(dentry))) {
if (unlikely(d_need_lookup(dentry))) {
spin_lock(&dentry->d_lock);
spin_lock(&dentry->d_lock);
dentry->d_flags &= ~DCACHE_NEED_LOOKUP;
dentry->d_flags &= ~DCACHE_NEED_LOOKUP;
...
@@ -627,7 +620,8 @@ out:
...
@@ -627,7 +620,8 @@ out:
static
void
au_pin_hdir_set_owner
(
struct
au_pin
*
p
,
struct
task_struct
*
task
)
static
void
au_pin_hdir_set_owner
(
struct
au_pin
*
p
,
struct
task_struct
*
task
)
{
{
#if !defined(CONFIG_RWSEM_GENERIC_SPINLOCK) && defined(CONFIG_RWSEM_SPIN_ON_OWNER)
#if !defined(CONFIG_RWSEM_GENERIC_SPINLOCK) \
&& defined(CONFIG_RWSEM_SPIN_ON_OWNER)
p
->
hdir
->
hi_inode
->
i_rwsem
.
owner
=
task
;
p
->
hdir
->
hi_inode
->
i_rwsem
.
owner
=
task
;
#endif
#endif
}
}
...
...
fs/aufs/i_op_ren.c
View file @
178371bc
...
@@ -402,7 +402,7 @@ static int do_rename(struct au_ren_args *a)
...
@@ -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
);
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)
BUG_ON(!au_ftest_ren(a->auren_flags, DIRREN)
&& d_is_positive(a->dst_h_dentry)
&& d_is_positive(a->dst_h_dentry)
&& a->src_btop != a->btgt);
&& a->src_btop != a->btgt);
...
...
fs/aufs/inode.c
View file @
178371bc
...
@@ -199,7 +199,7 @@ static int set_inode(struct inode *inode, struct dentry *dentry)
...
@@ -199,7 +199,7 @@ static int set_inode(struct inode *inode, struct dentry *dentry)
struct
dentry
*
h_dentry
;
struct
dentry
*
h_dentry
;
struct
inode
*
h_inode
;
struct
inode
*
h_inode
;
struct
au_iinfo
*
iinfo
;
struct
au_iinfo
*
iinfo
;
struct
inode_operations
*
iop
;
const
struct
inode_operations
*
iop
;
IiMustWriteLock
(
inode
);
IiMustWriteLock
(
inode
);
...
...
fs/aufs/inode.h
View file @
178371bc
...
@@ -144,7 +144,7 @@ enum {
...
@@ -144,7 +144,7 @@ enum {
AuIop_OTHER
,
AuIop_OTHER
,
AuIop_Last
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
];
aufs_iop_nogetattr
[
AuIop_Last
];
/* au_wr_dir flags */
/* au_wr_dir flags */
...
...
fs/aufs/opts.c
View file @
178371bc
...
@@ -1614,7 +1614,7 @@ int au_opts_verify(struct super_block *sb, unsigned long sb_flags,
...
@@ -1614,7 +1614,7 @@ int au_opts_verify(struct super_block *sb, unsigned long sb_flags,
if
((
br
->
br_perm
&
AuBrAttr_ICEX
)
if
((
br
->
br_perm
&
AuBrAttr_ICEX
)
&&
!
h_dir
->
i_op
->
listxattr
)
&&
!
h_dir
->
i_op
->
listxattr
)
br
->
br_perm
&=
~
AuBrAttr_ICEX
;
br
->
br_perm
&=
~
AuBrAttr_ICEX
;
#if 0
#if 0
/* untested */
if ((br->br_perm & AuBrAttr_ICEX_SEC)
if ((br->br_perm & AuBrAttr_ICEX_SEC)
&& (au_br_sb(br)->s_flags & SB_NOSEC))
&& (au_br_sb(br)->s_flags & SB_NOSEC))
br->br_perm &= ~AuBrAttr_ICEX_SEC;
br->br_perm &= ~AuBrAttr_ICEX_SEC;
...
...
fs/aufs/super.c
View file @
178371bc
...
@@ -236,7 +236,7 @@ static int aufs_show_options(struct seq_file *m, struct dentry *dentry)
...
@@ -236,7 +236,7 @@ static int aufs_show_options(struct seq_file *m, struct dentry *dentry)
sb
=
dentry
->
d_sb
;
sb
=
dentry
->
d_sb
;
if
(
sb
->
s_flags
&
SB_POSIXACL
)
if
(
sb
->
s_flags
&
SB_POSIXACL
)
seq_puts
(
m
,
",acl"
);
seq_puts
(
m
,
",acl"
);
#if 0
#if 0
/* reserved for future use */
if (sb->s_flags & SB_I_VERSION)
if (sb->s_flags & SB_I_VERSION)
seq_puts(m, ",i_version");
seq_puts(m, ",i_version");
#endif
#endif
...
...
fs/aufs/super.h
View file @
178371bc
...
@@ -166,7 +166,7 @@ struct au_sbinfo {
...
@@ -166,7 +166,7 @@ struct au_sbinfo {
struct
hlist_bl_head
si_files
;
struct
hlist_bl_head
si_files
;
/* with/without getattr, brother of sb->s_d_op */
/* 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.
* sysfs and lifetime management.
...
...
fs/aufs/sysrq.c
View file @
178371bc
...
@@ -21,6 +21,7 @@ static void sysrq_sb(struct super_block *sb)
...
@@ -21,6 +21,7 @@ static void sysrq_sb(struct super_block *sb)
struct
hlist_bl_head
*
files
;
struct
hlist_bl_head
*
files
;
struct
hlist_bl_node
*
pos
;
struct
hlist_bl_node
*
pos
;
struct
au_finfo
*
finfo
;
struct
au_finfo
*
finfo
;
struct
inode
*
i
;
plevel
=
au_plevel
;
plevel
=
au_plevel
;
au_plevel
=
KERN_WARNING
;
au_plevel
=
KERN_WARNING
;
...
@@ -33,14 +34,7 @@ static void sysrq_sb(struct super_block *sb)
...
@@ -33,14 +34,7 @@ static void sysrq_sb(struct super_block *sb)
pr
(
"superblock
\n
"
);
pr
(
"superblock
\n
"
);
au_dpri_sb
(
sb
);
au_dpri_sb
(
sb
);
#if 0
#if 0 /* reserved */
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
do {
do {
int err, i, j, ndentry;
int err, i, j, ndentry;
struct au_dcsub_pages dpages;
struct au_dcsub_pages dpages;
...
@@ -61,21 +55,16 @@ static void sysrq_sb(struct super_block *sb)
...
@@ -61,21 +55,16 @@ static void sysrq_sb(struct super_block *sb)
} while (0);
} while (0);
#endif
#endif
#if 1
pr
(
"isolated inode
\n
"
);
{
spin_lock
(
&
sb
->
s_inode_list_lock
);
struct
inode
*
i
;
list_for_each_entry
(
i
,
&
sb
->
s_inodes
,
i_sb_list
)
{
spin_lock
(
&
i
->
i_lock
);
pr
(
"isolated inode
\n
"
);
if
(
hlist_empty
(
&
i
->
i_dentry
))
spin_lock
(
&
sb
->
s_inode_list_lock
);
au_dpri_inode
(
i
);
list_for_each_entry
(
i
,
&
sb
->
s_inodes
,
i_sb_list
)
{
spin_unlock
(
&
i
->
i_lock
);
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
);
}
}
#endif
spin_unlock
(
&
sb
->
s_inode_list_lock
);
pr
(
"files
\n
"
);
pr
(
"files
\n
"
);
files
=
&
au_sbi
(
sb
)
->
si_files
;
files
=
&
au_sbi
(
sb
)
->
si_files
;
hlist_bl_lock
(
files
);
hlist_bl_lock
(
files
);
...
...
fs/aufs/vdir.c
View file @
178371bc
...
@@ -82,7 +82,7 @@ int au_nhash_alloc(struct au_nhash *nhash, unsigned int num_hash, gfp_t gfp)
...
@@ -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
)
static
void
nhash_count
(
struct
hlist_head
*
head
)
{
{
#if 0
#if 0
/* debugging */
unsigned long n;
unsigned long n;
struct hlist_node *pos;
struct hlist_node *pos;
...
...
fs/aufs/whout.c
View file @
178371bc
...
@@ -292,7 +292,7 @@ static int test_linkable(struct dentry *h_root)
...
@@ -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
"
,
pr_err
(
"%pd (%s) doesn't support link(2), use noplink and rw+nolwh
\n
"
,
h_root
,
au_sbtype
(
h_root
->
d_sb
));
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? */
/* todo: should this mkdir be done in /sbin/mount.aufs helper? */
...
...
fs/aufs/wkq.c
View file @
178371bc
...
@@ -140,8 +140,8 @@ static int au_wkq_lockdep_alloc(struct au_wkinfo *wkinfo)
...
@@ -140,8 +140,8 @@ static int au_wkq_lockdep_alloc(struct au_wkinfo *wkinfo)
goto
out
;
goto
out
;
err
=
0
;
err
=
0
;
#if 0
#if 0
/* left for debugging */
if (0 && au_debug_test())
/* left for debugging */
if (0 && au_debug_test())
lockdep_print_held_locks(curr);
lockdep_print_held_locks(curr);
#endif
#endif
held_locks
=
curr
->
held_locks
;
held_locks
=
curr
->
held_locks
;
...
@@ -218,7 +218,6 @@ static void wkq_func(struct work_struct *wk)
...
@@ -218,7 +218,6 @@ static void wkq_func(struct work_struct *wk)
/*
/*
* Since struct completion is large, try allocating it dynamically.
* Since struct completion is large, try allocating it dynamically.
*/
*/
#if 1
/* defined(CONFIG_4KSTACKS) || defined(AuTest4KSTACKS) */
#define AuWkqCompDeclare(name) struct completion *comp = NULL
#define AuWkqCompDeclare(name) struct completion *comp = NULL
static
int
au_wkq_comp_alloc
(
struct
au_wkinfo
*
wkinfo
,
struct
completion
**
comp
)
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)
...
@@ -237,25 +236,6 @@ static void au_wkq_comp_free(struct completion *comp)
au_kfree_rcu
(
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
)
static
void
au_wkq_run
(
struct
au_wkinfo
*
wkinfo
)
{
{
if
(
au_ftest_wkq
(
wkinfo
->
flags
,
NEST
))
{
if
(
au_ftest_wkq
(
wkinfo
->
flags
,
NEST
))
{
...
...
fs/aufs/xino.c
View file @
178371bc
...
@@ -1342,7 +1342,7 @@ static void au_xino_release(struct kref *kref)
...
@@ -1342,7 +1342,7 @@ static void au_xino_release(struct kref *kref)
if
(
unlikely
(
ul
))
{
if
(
unlikely
(
ul
))
{
pr_warn
(
"xi_writing %lu
\n
"
,
ul
);
pr_warn
(
"xi_writing %lu
\n
"
,
ul
);
hlist_bl_lock
(
hbl
);
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
);
hlist_bl_del
(
&
p
->
node
);
au_kfree_rcu
(
p
);
au_kfree_rcu
(
p
);
}
}
...
...
include/uapi/linux/aufs_type.h
View file @
178371bc
...
@@ -20,13 +20,13 @@
...
@@ -20,13 +20,13 @@
#define pr_fmt(fmt) \
#define pr_fmt(fmt) \
AUFS_NAME " %s:%d:%.*s[%d]: " fmt, __func__, __LINE__, \
AUFS_NAME " %s:%d:%.*s[%d]: " fmt, __func__, __LINE__, \
(int)sizeof(current->comm), current->comm, current->pid
(int)sizeof(current->comm), current->comm, current->pid
#include <linux/limits.h>
#else
#else
#include <stdint.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/types.h>
#include <limits.h>
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
#include <linux/limits.h>
#define AUFS_VERSION "5.x-rcN"
#define AUFS_VERSION "5.x-rcN"
/* todo? move this to linux-2.6.19/include/magic.h */
/* todo? move this to linux-2.6.19/include/magic.h */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment