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
02bd9799
Commit
02bd9799
authored
May 21, 2010
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch ecryptfs_get_locked_page() to struct inode *
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
bef5bc24
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
15 deletions
+7
-15
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/ecryptfs_kernel.h
+1
-1
fs/ecryptfs/mmap.c
fs/ecryptfs/mmap.c
+2
-10
fs/ecryptfs/read_write.c
fs/ecryptfs/read_write.c
+4
-4
No files found.
fs/ecryptfs/ecryptfs_kernel.h
View file @
02bd9799
...
@@ -739,7 +739,7 @@ int ecryptfs_read_lower_page_segment(struct page *page_for_ecryptfs,
...
@@ -739,7 +739,7 @@ int ecryptfs_read_lower_page_segment(struct page *page_for_ecryptfs,
pgoff_t
page_index
,
pgoff_t
page_index
,
size_t
offset_in_page
,
size_t
size
,
size_t
offset_in_page
,
size_t
size
,
struct
inode
*
ecryptfs_inode
);
struct
inode
*
ecryptfs_inode
);
struct
page
*
ecryptfs_get_locked_page
(
struct
file
*
fil
e
,
loff_t
index
);
struct
page
*
ecryptfs_get_locked_page
(
struct
inode
*
inod
e
,
loff_t
index
);
int
ecryptfs_exorcise_daemon
(
struct
ecryptfs_daemon
*
daemon
);
int
ecryptfs_exorcise_daemon
(
struct
ecryptfs_daemon
*
daemon
);
int
ecryptfs_find_daemon_by_euid
(
struct
ecryptfs_daemon
**
daemon
,
uid_t
euid
,
int
ecryptfs_find_daemon_by_euid
(
struct
ecryptfs_daemon
**
daemon
,
uid_t
euid
,
struct
user_namespace
*
user_ns
);
struct
user_namespace
*
user_ns
);
...
...
fs/ecryptfs/mmap.c
View file @
02bd9799
...
@@ -44,17 +44,9 @@
...
@@ -44,17 +44,9 @@
* Returns locked and up-to-date page (if ok), with increased
* Returns locked and up-to-date page (if ok), with increased
* refcnt.
* refcnt.
*/
*/
struct
page
*
ecryptfs_get_locked_page
(
struct
file
*
fil
e
,
loff_t
index
)
struct
page
*
ecryptfs_get_locked_page
(
struct
inode
*
inod
e
,
loff_t
index
)
{
{
struct
dentry
*
dentry
;
struct
page
*
page
=
read_mapping_page
(
inode
->
i_mapping
,
index
,
NULL
);
struct
inode
*
inode
;
struct
address_space
*
mapping
;
struct
page
*
page
;
dentry
=
file
->
f_path
.
dentry
;
inode
=
dentry
->
d_inode
;
mapping
=
inode
->
i_mapping
;
page
=
read_mapping_page
(
mapping
,
index
,
(
void
*
)
file
);
if
(
!
IS_ERR
(
page
))
if
(
!
IS_ERR
(
page
))
lock_page
(
page
);
lock_page
(
page
);
return
page
;
return
page
;
...
...
fs/ecryptfs/read_write.c
View file @
02bd9799
...
@@ -145,7 +145,7 @@ int ecryptfs_write(struct file *ecryptfs_file, char *data, loff_t offset,
...
@@ -145,7 +145,7 @@ int ecryptfs_write(struct file *ecryptfs_file, char *data, loff_t offset,
if
(
num_bytes
>
total_remaining_zeros
)
if
(
num_bytes
>
total_remaining_zeros
)
num_bytes
=
total_remaining_zeros
;
num_bytes
=
total_remaining_zeros
;
}
}
ecryptfs_page
=
ecryptfs_get_locked_page
(
ecryptfs_
fil
e
,
ecryptfs_page
=
ecryptfs_get_locked_page
(
ecryptfs_
inod
e
,
ecryptfs_page_idx
);
ecryptfs_page_idx
);
if
(
IS_ERR
(
ecryptfs_page
))
{
if
(
IS_ERR
(
ecryptfs_page
))
{
rc
=
PTR_ERR
(
ecryptfs_page
);
rc
=
PTR_ERR
(
ecryptfs_page
);
...
@@ -302,10 +302,10 @@ int ecryptfs_read_lower_page_segment(struct page *page_for_ecryptfs,
...
@@ -302,10 +302,10 @@ int ecryptfs_read_lower_page_segment(struct page *page_for_ecryptfs,
int ecryptfs_read(char *data, loff_t offset, size_t size,
int ecryptfs_read(char *data, loff_t offset, size_t size,
struct file *ecryptfs_file)
struct file *ecryptfs_file)
{
{
struct inode *ecryptfs_inode = ecryptfs_file->f_dentry->d_inode;
struct page *ecryptfs_page;
struct page *ecryptfs_page;
char *ecryptfs_page_virt;
char *ecryptfs_page_virt;
loff_t ecryptfs_file_size =
loff_t ecryptfs_file_size = i_size_read(ecryptfs_inode);
i_size_read(ecryptfs_file->f_dentry->d_inode);
loff_t data_offset = 0;
loff_t data_offset = 0;
loff_t pos;
loff_t pos;
int rc = 0;
int rc = 0;
...
@@ -327,7 +327,7 @@ int ecryptfs_read(char *data, loff_t offset, size_t size,
...
@@ -327,7 +327,7 @@ int ecryptfs_read(char *data, loff_t offset, size_t size,
if (num_bytes > total_remaining_bytes)
if (num_bytes > total_remaining_bytes)
num_bytes = total_remaining_bytes;
num_bytes = total_remaining_bytes;
ecryptfs_page = ecryptfs_get_locked_page(ecryptfs_
fil
e,
ecryptfs_page = ecryptfs_get_locked_page(ecryptfs_
inod
e,
ecryptfs_page_idx);
ecryptfs_page_idx);
if (IS_ERR(ecryptfs_page)) {
if (IS_ERR(ecryptfs_page)) {
rc = PTR_ERR(ecryptfs_page);
rc = PTR_ERR(ecryptfs_page);
...
...
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