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
317bc947
Commit
317bc947
authored
Dec 11, 2017
by
Jeff Layton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exofs: switch to new i_version API
Signed-off-by:
Jeff Layton
<
jlayton@redhat.com
>
parent
c7f88c4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
fs/exofs/dir.c
fs/exofs/dir.c
+5
-4
fs/exofs/super.c
fs/exofs/super.c
+2
-1
No files found.
fs/exofs/dir.c
View file @
317bc947
...
...
@@ -31,6 +31,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <linux/iversion.h>
#include "exofs.h"
static
inline
unsigned
exofs_chunk_size
(
struct
inode
*
inode
)
...
...
@@ -60,7 +61,7 @@ static int exofs_commit_chunk(struct page *page, loff_t pos, unsigned len)
struct
inode
*
dir
=
mapping
->
host
;
int
err
=
0
;
dir
->
i_version
++
;
inode_inc_iversion
(
dir
)
;
if
(
!
PageUptodate
(
page
))
SetPageUptodate
(
page
);
...
...
@@ -241,7 +242,7 @@ exofs_readdir(struct file *file, struct dir_context *ctx)
unsigned
long
n
=
pos
>>
PAGE_SHIFT
;
unsigned
long
npages
=
dir_pages
(
inode
);
unsigned
chunk_mask
=
~
(
exofs_chunk_size
(
inode
)
-
1
);
int
need_revalidate
=
(
file
->
f_version
!=
inode
->
i
_version
);
bool
need_revalidate
=
inode_cmp_iversion
(
inode
,
file
->
f
_version
);
if
(
pos
>
inode
->
i_size
-
EXOFS_DIR_REC_LEN
(
1
))
return
0
;
...
...
@@ -264,8 +265,8 @@ exofs_readdir(struct file *file, struct dir_context *ctx)
chunk_mask
);
ctx
->
pos
=
(
n
<<
PAGE_SHIFT
)
+
offset
;
}
file
->
f_version
=
inode
->
i_version
;
need_revalidate
=
0
;
file
->
f_version
=
inode
_query_iversion
(
inode
)
;
need_revalidate
=
false
;
}
de
=
(
struct
exofs_dir_entry
*
)(
kaddr
+
offset
);
limit
=
kaddr
+
exofs_last_byte
(
inode
,
n
)
-
...
...
fs/exofs/super.c
View file @
317bc947
...
...
@@ -38,6 +38,7 @@
#include <linux/module.h>
#include <linux/exportfs.h>
#include <linux/slab.h>
#include <linux/iversion.h>
#include "exofs.h"
...
...
@@ -159,7 +160,7 @@ static struct inode *exofs_alloc_inode(struct super_block *sb)
if
(
!
oi
)
return
NULL
;
oi
->
vfs_inode
.
i_version
=
1
;
inode_set_iversion
(
&
oi
->
vfs_inode
,
1
)
;
return
&
oi
->
vfs_inode
;
}
...
...
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