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
40870dcc
Commit
40870dcc
authored
May 17, 2020
by
J. R. Okajima
Browse files
Merge branch 'aufs5.6/30stdalone' into aufs5.6/39public
parents
7c07d973
b60bdca7
Changes
6
Show whitespace changes
Inline
Side-by-side
fs/aufs/dir.h
View file @
40870dcc
...
@@ -38,7 +38,7 @@ struct au_nhash {
...
@@ -38,7 +38,7 @@ struct au_nhash {
struct
au_vdir_destr
{
struct
au_vdir_destr
{
unsigned
char
len
;
unsigned
char
len
;
unsigned
char
name
[
0
];
unsigned
char
name
[];
}
__packed
;
}
__packed
;
struct
au_vdir_dehstr
{
struct
au_vdir_dehstr
{
...
...
fs/aufs/dirren.c
View file @
40870dcc
...
@@ -584,7 +584,7 @@ struct au_drinfo_rev_elm {
...
@@ -584,7 +584,7 @@ struct au_drinfo_rev_elm {
struct
au_drinfo_rev
{
struct
au_drinfo_rev
{
unsigned
char
already
;
unsigned
char
already
;
aufs_bindex_t
nelm
;
aufs_bindex_t
nelm
;
struct
au_drinfo_rev_elm
elm
[
0
];
struct
au_drinfo_rev_elm
elm
[];
};
};
/* todo: isn't it too large? */
/* todo: isn't it too large? */
...
...
fs/aufs/i_op.c
View file @
40870dcc
...
@@ -1180,15 +1180,14 @@ static void au_refresh_iattr(struct inode *inode, struct kstat *st,
...
@@ -1180,15 +1180,14 @@ static void au_refresh_iattr(struct inode *inode, struct kstat *st,
* returns zero or negative (an error).
* returns zero or negative (an error).
* @dentry will be read-locked in success.
* @dentry will be read-locked in success.
*/
*/
int
au_h_path_getattr
(
struct
dentry
*
dentry
,
int
force
,
struct
path
*
h_path
,
int
au_h_path_getattr
(
struct
dentry
*
dentry
,
struct
inode
*
inode
,
int
force
,
int
locked
)
struct
path
*
h_path
,
int
locked
)
{
{
int
err
;
int
err
;
unsigned
int
mnt_flags
,
sigen
;
unsigned
int
mnt_flags
,
sigen
;
unsigned
char
udba_none
;
unsigned
char
udba_none
;
aufs_bindex_t
bindex
;
aufs_bindex_t
bindex
;
struct
super_block
*
sb
,
*
h_sb
;
struct
super_block
*
sb
,
*
h_sb
;
struct
inode
*
inode
;
h_path
->
mnt
=
NULL
;
h_path
->
mnt
=
NULL
;
h_path
->
dentry
=
NULL
;
h_path
->
dentry
=
NULL
;
...
@@ -1229,7 +1228,11 @@ int au_h_path_getattr(struct dentry *dentry, int force, struct path *h_path,
...
@@ -1229,7 +1228,11 @@ int au_h_path_getattr(struct dentry *dentry, int force, struct path *h_path,
di_read_lock_child
(
dentry
,
AuLock_IR
);
di_read_lock_child
(
dentry
,
AuLock_IR
);
body:
body:
if
(
!
inode
)
{
inode
=
d_inode
(
dentry
);
inode
=
d_inode
(
dentry
);
if
(
unlikely
(
!
inode
))
goto
out
;
}
bindex
=
au_ibtop
(
inode
);
bindex
=
au_ibtop
(
inode
);
h_path
->
mnt
=
au_sbr_mnt
(
sb
,
bindex
);
h_path
->
mnt
=
au_sbr_mnt
(
sb
,
bindex
);
h_sb
=
h_path
->
mnt
->
mnt_sb
;
h_sb
=
h_path
->
mnt
->
mnt_sb
;
...
@@ -1269,7 +1272,8 @@ static int aufs_getattr(const struct path *path, struct kstat *st,
...
@@ -1269,7 +1272,8 @@ static int aufs_getattr(const struct path *path, struct kstat *st,
err
=
si_read_lock
(
sb
,
AuLock_FLUSH
|
AuLock_NOPLM
);
err
=
si_read_lock
(
sb
,
AuLock_FLUSH
|
AuLock_NOPLM
);
if
(
unlikely
(
err
))
if
(
unlikely
(
err
))
goto
out
;
goto
out
;
err
=
au_h_path_getattr
(
dentry
,
/*force*/
0
,
&
h_path
,
/*locked*/
0
);
err
=
au_h_path_getattr
(
dentry
,
/*inode*/
NULL
,
/*force*/
0
,
&
h_path
,
/*locked*/
0
);
if
(
unlikely
(
err
))
if
(
unlikely
(
err
))
goto
out_si
;
goto
out_si
;
if
(
unlikely
(
!
h_path
.
dentry
))
if
(
unlikely
(
!
h_path
.
dentry
))
...
...
fs/aufs/inode.h
View file @
40870dcc
...
@@ -207,8 +207,8 @@ struct au_icpup_args {
...
@@ -207,8 +207,8 @@ struct au_icpup_args {
int
au_pin_and_icpup
(
struct
dentry
*
dentry
,
struct
iattr
*
ia
,
int
au_pin_and_icpup
(
struct
dentry
*
dentry
,
struct
iattr
*
ia
,
struct
au_icpup_args
*
a
);
struct
au_icpup_args
*
a
);
int
au_h_path_getattr
(
struct
dentry
*
dentry
,
int
force
,
struct
path
*
h_path
,
int
au_h_path_getattr
(
struct
dentry
*
dentry
,
struct
inode
*
inode
,
int
force
,
int
locked
);
struct
path
*
h_path
,
int
locked
);
/* i_op_add.c */
/* i_op_add.c */
int
au_may_add
(
struct
dentry
*
dentry
,
aufs_bindex_t
bindex
,
int
au_may_add
(
struct
dentry
*
dentry
,
aufs_bindex_t
bindex
,
...
...
fs/aufs/xattr.c
View file @
40870dcc
...
@@ -194,7 +194,7 @@ out:
...
@@ -194,7 +194,7 @@ out:
static
int
au_smack_reentering
(
struct
super_block
*
sb
)
static
int
au_smack_reentering
(
struct
super_block
*
sb
)
{
{
#if IS_ENABLED(CONFIG_SECURITY_SMACK)
#if IS_ENABLED(CONFIG_SECURITY_SMACK)
|| IS_ENABLED(CONFIG_SECURITY_SELINUX)
/*
/*
* as a part of lookup, smack_d_instantiate() is called, and it calls
* as a part of lookup, smack_d_instantiate() is called, and it calls
* i_op->getxattr(). ouch.
* i_op->getxattr(). ouch.
...
@@ -225,7 +225,8 @@ struct au_lgxattr {
...
@@ -225,7 +225,8 @@ struct au_lgxattr {
}
u
;
}
u
;
};
};
static
ssize_t
au_lgxattr
(
struct
dentry
*
dentry
,
struct
au_lgxattr
*
arg
)
static
ssize_t
au_lgxattr
(
struct
dentry
*
dentry
,
struct
inode
*
inode
,
struct
au_lgxattr
*
arg
)
{
{
ssize_t
err
;
ssize_t
err
;
int
reenter
;
int
reenter
;
...
@@ -239,7 +240,7 @@ static ssize_t au_lgxattr(struct dentry *dentry, struct au_lgxattr *arg)
...
@@ -239,7 +240,7 @@ static ssize_t au_lgxattr(struct dentry *dentry, struct au_lgxattr *arg)
if
(
unlikely
(
err
))
if
(
unlikely
(
err
))
goto
out
;
goto
out
;
}
}
err
=
au_h_path_getattr
(
dentry
,
/*force*/
1
,
&
h_path
,
reenter
);
err
=
au_h_path_getattr
(
dentry
,
inode
,
/*force*/
1
,
&
h_path
,
reenter
);
if
(
unlikely
(
err
))
if
(
unlikely
(
err
))
goto
out_si
;
goto
out_si
;
if
(
unlikely
(
!
h_path
.
dentry
))
if
(
unlikely
(
!
h_path
.
dentry
))
...
@@ -281,11 +282,10 @@ ssize_t aufs_listxattr(struct dentry *dentry, char *list, size_t size)
...
@@ -281,11 +282,10 @@ ssize_t aufs_listxattr(struct dentry *dentry, char *list, size_t size)
},
},
};
};
return
au_lgxattr
(
dentry
,
&
arg
);
return
au_lgxattr
(
dentry
,
/*inode*/
NULL
,
&
arg
);
}
}
static
ssize_t
au_getxattr
(
struct
dentry
*
dentry
,
static
ssize_t
au_getxattr
(
struct
dentry
*
dentry
,
struct
inode
*
inode
,
struct
inode
*
inode
__maybe_unused
,
const
char
*
name
,
void
*
value
,
size_t
size
)
const
char
*
name
,
void
*
value
,
size_t
size
)
{
{
struct
au_lgxattr
arg
=
{
struct
au_lgxattr
arg
=
{
...
@@ -297,7 +297,7 @@ static ssize_t au_getxattr(struct dentry *dentry,
...
@@ -297,7 +297,7 @@ static ssize_t au_getxattr(struct dentry *dentry,
},
},
};
};
return
au_lgxattr
(
dentry
,
&
arg
);
return
au_lgxattr
(
dentry
,
inode
,
&
arg
);
}
}
static
int
au_setxattr
(
struct
dentry
*
dentry
,
struct
inode
*
inode
,
static
int
au_setxattr
(
struct
dentry
*
dentry
,
struct
inode
*
inode
,
...
...
include/uapi/linux/aufs_type.h
View file @
40870dcc
...
@@ -287,7 +287,7 @@ struct au_rdu_ent {
...
@@ -287,7 +287,7 @@ struct au_rdu_ent {
uint8_t
type
;
uint8_t
type
;
uint8_t
nlen
;
uint8_t
nlen
;
uint8_t
wh
;
uint8_t
wh
;
char
name
[
0
];
char
name
[];
}
__aligned
(
8
);
}
__aligned
(
8
);
static
inline
int
au_rdu_len
(
int
nlen
)
static
inline
int
au_rdu_len
(
int
nlen
)
...
@@ -338,7 +338,7 @@ struct au_drinfo {
...
@@ -338,7 +338,7 @@ struct au_drinfo {
uint8_t
oldnamelen
;
uint8_t
oldnamelen
;
uint64_t
_padding
;
uint64_t
_padding
;
};
};
uint8_t
oldname
[
0
];
uint8_t
oldname
[];
}
__aligned
(
8
);
}
__aligned
(
8
);
struct
au_drinfo_fdata
{
struct
au_drinfo_fdata
{
...
@@ -432,7 +432,7 @@ union aufs_brinfo {
...
@@ -432,7 +432,7 @@ union aufs_brinfo {
struct
{
struct
{
int16_t
id
;
int16_t
id
;
int
perm
;
int
perm
;
char
path
[
0
];
char
path
[];
};
};
}
__aligned
(
8
);
}
__aligned
(
8
);
...
...
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