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
Kirill Smelkov
linux
Commits
9332cf14
Commit
9332cf14
authored
Feb 26, 2022
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFS: Clean up page array initialisation/free
Signed-off-by:
Trond Myklebust
<
trond.myklebust@hammerspace.com
>
parent
11d03d0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
fs/nfs/dir.c
fs/nfs/dir.c
+6
-10
No files found.
fs/nfs/dir.c
View file @
9332cf14
...
...
@@ -199,20 +199,17 @@ static void nfs_grow_dtsize(struct nfs_readdir_descriptor *desc)
nfs_set_dtsize
(
desc
,
desc
->
dtsize
<<
1
);
}
static
void
nfs_readdir_array_init
(
struct
nfs_cache_array
*
array
)
{
memset
(
array
,
0
,
sizeof
(
struct
nfs_cache_array
));
}
static
void
nfs_readdir_page_init_array
(
struct
page
*
page
,
u64
last_cookie
,
u64
change_attr
)
{
struct
nfs_cache_array
*
array
;
array
=
kmap_atomic
(
page
);
nfs_readdir_array_init
(
array
);
array
->
change_attr
=
change_attr
;
array
->
last_cookie
=
last_cookie
;
array
->
size
=
0
;
array
->
page_full
=
0
;
array
->
page_is_eof
=
0
;
array
->
cookies_are_ordered
=
1
;
kunmap_atomic
(
array
);
}
...
...
@@ -220,16 +217,15 @@ static void nfs_readdir_page_init_array(struct page *page, u64 last_cookie,
/*
* we are freeing strings created by nfs_add_to_readdir_array()
*/
static
void
nfs_readdir_clear_array
(
struct
page
*
page
)
static
void
nfs_readdir_clear_array
(
struct
page
*
page
)
{
struct
nfs_cache_array
*
array
;
int
i
;
unsigned
int
i
;
array
=
kmap_atomic
(
page
);
for
(
i
=
0
;
i
<
array
->
size
;
i
++
)
kfree
(
array
->
array
[
i
].
name
);
nfs_readdir_array_init
(
array
)
;
array
->
size
=
0
;
kunmap_atomic
(
array
);
}
...
...
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