Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
09208d15
Commit
09208d15
authored
Jul 26, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shmem, ramfs: propagate umode_t, open-coded S_ISREG
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
88176446
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
include/linux/shmem_fs.h
include/linux/shmem_fs.h
+1
-1
mm/shmem.c
mm/shmem.c
+3
-3
No files found.
include/linux/shmem_fs.h
View file @
09208d15
...
...
@@ -30,7 +30,7 @@ struct shmem_sb_info {
spinlock_t
stat_lock
;
/* Serialize shmem_sb_info changes */
uid_t
uid
;
/* Mount uid for root directory */
gid_t
gid
;
/* Mount gid for root directory */
mode_t
mode
;
/* Mount mode for root directory */
u
mode_t
mode
;
/* Mount mode for root directory */
struct
mempolicy
*
mpol
;
/* default memory policy for mappings */
};
...
...
mm/shmem.c
View file @
09208d15
...
...
@@ -1092,7 +1092,7 @@ static int shmem_mmap(struct file *file, struct vm_area_struct *vma)
}
static
struct
inode
*
shmem_get_inode
(
struct
super_block
*
sb
,
const
struct
inode
*
dir
,
in
t
mode
,
dev_t
dev
,
unsigned
long
flags
)
umode_
t
mode
,
dev_t
dev
,
unsigned
long
flags
)
{
struct
inode
*
inode
;
struct
shmem_inode_info
*
info
;
...
...
@@ -2128,7 +2128,7 @@ static int shmem_show_options(struct seq_file *seq, struct vfsmount *vfs)
if
(
sbinfo
->
max_inodes
!=
shmem_default_max_inodes
())
seq_printf
(
seq
,
",nr_inodes=%lu"
,
sbinfo
->
max_inodes
);
if
(
sbinfo
->
mode
!=
(
S_IRWXUGO
|
S_ISVTX
))
seq_printf
(
seq
,
",mode=%03o"
,
sbinfo
->
mode
);
seq_printf
(
seq
,
",mode=%03
h
o"
,
sbinfo
->
mode
);
if
(
sbinfo
->
uid
!=
0
)
seq_printf
(
seq
,
",uid=%u"
,
sbinfo
->
uid
);
if
(
sbinfo
->
gid
!=
0
)
...
...
@@ -2239,7 +2239,7 @@ static void shmem_destroy_callback(struct rcu_head *head)
static
void
shmem_destroy_inode
(
struct
inode
*
inode
)
{
if
(
(
inode
->
i_mode
&
S_IFMT
)
==
S_IFREG
)
if
(
S_ISREG
(
inode
->
i_mode
)
)
mpol_free_shared_policy
(
&
SHMEM_I
(
inode
)
->
policy
);
call_rcu
(
&
inode
->
i_rcu
,
shmem_destroy_callback
);
}
...
...
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