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
9dffe569
Commit
9dffe569
authored
Dec 11, 2017
by
Jeff Layton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
affs: convert to new i_version API
Signed-off-by:
Jeff Layton
<
jlayton@redhat.com
>
parent
2489dbab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
fs/affs/amigaffs.c
fs/affs/amigaffs.c
+3
-2
fs/affs/dir.c
fs/affs/dir.c
+3
-2
fs/affs/super.c
fs/affs/super.c
+2
-1
No files found.
fs/affs/amigaffs.c
View file @
9dffe569
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
*/
*/
#include <linux/math64.h>
#include <linux/math64.h>
#include <linux/iversion.h>
#include "affs.h"
#include "affs.h"
/*
/*
...
@@ -60,7 +61,7 @@ affs_insert_hash(struct inode *dir, struct buffer_head *bh)
...
@@ -60,7 +61,7 @@ affs_insert_hash(struct inode *dir, struct buffer_head *bh)
affs_brelse
(
dir_bh
);
affs_brelse
(
dir_bh
);
dir
->
i_mtime
=
dir
->
i_ctime
=
current_time
(
dir
);
dir
->
i_mtime
=
dir
->
i_ctime
=
current_time
(
dir
);
dir
->
i_version
++
;
inode_inc_iversion
(
dir
)
;
mark_inode_dirty
(
dir
);
mark_inode_dirty
(
dir
);
return
0
;
return
0
;
...
@@ -114,7 +115,7 @@ affs_remove_hash(struct inode *dir, struct buffer_head *rem_bh)
...
@@ -114,7 +115,7 @@ affs_remove_hash(struct inode *dir, struct buffer_head *rem_bh)
affs_brelse
(
bh
);
affs_brelse
(
bh
);
dir
->
i_mtime
=
dir
->
i_ctime
=
current_time
(
dir
);
dir
->
i_mtime
=
dir
->
i_ctime
=
current_time
(
dir
);
dir
->
i_version
++
;
inode_inc_iversion
(
dir
)
;
mark_inode_dirty
(
dir
);
mark_inode_dirty
(
dir
);
return
retval
;
return
retval
;
...
...
fs/affs/dir.c
View file @
9dffe569
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
*
*
*/
*/
#include <linux/iversion.h>
#include "affs.h"
#include "affs.h"
static
int
affs_readdir
(
struct
file
*
,
struct
dir_context
*
);
static
int
affs_readdir
(
struct
file
*
,
struct
dir_context
*
);
...
@@ -80,7 +81,7 @@ affs_readdir(struct file *file, struct dir_context *ctx)
...
@@ -80,7 +81,7 @@ affs_readdir(struct file *file, struct dir_context *ctx)
* we can jump directly to where we left off.
* we can jump directly to where we left off.
*/
*/
ino
=
(
u32
)(
long
)
file
->
private_data
;
ino
=
(
u32
)(
long
)
file
->
private_data
;
if
(
ino
&&
file
->
f_version
==
inode
->
i_version
)
{
if
(
ino
&&
inode_cmp_iversion
(
inode
,
file
->
f_version
)
==
0
)
{
pr_debug
(
"readdir() left off=%d
\n
"
,
ino
);
pr_debug
(
"readdir() left off=%d
\n
"
,
ino
);
goto
inside
;
goto
inside
;
}
}
...
@@ -130,7 +131,7 @@ affs_readdir(struct file *file, struct dir_context *ctx)
...
@@ -130,7 +131,7 @@ affs_readdir(struct file *file, struct dir_context *ctx)
}
while
(
ino
);
}
while
(
ino
);
}
}
done:
done:
file
->
f_version
=
inode
->
i_version
;
file
->
f_version
=
inode
_query_iversion
(
inode
)
;
file
->
private_data
=
(
void
*
)(
long
)
ino
;
file
->
private_data
=
(
void
*
)(
long
)
ino
;
affs_brelse
(
fh_bh
);
affs_brelse
(
fh_bh
);
...
...
fs/affs/super.c
View file @
9dffe569
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include <linux/writeback.h>
#include <linux/writeback.h>
#include <linux/blkdev.h>
#include <linux/blkdev.h>
#include <linux/seq_file.h>
#include <linux/seq_file.h>
#include <linux/iversion.h>
#include "affs.h"
#include "affs.h"
static
int
affs_statfs
(
struct
dentry
*
dentry
,
struct
kstatfs
*
buf
);
static
int
affs_statfs
(
struct
dentry
*
dentry
,
struct
kstatfs
*
buf
);
...
@@ -102,7 +103,7 @@ static struct inode *affs_alloc_inode(struct super_block *sb)
...
@@ -102,7 +103,7 @@ static struct inode *affs_alloc_inode(struct super_block *sb)
if
(
!
i
)
if
(
!
i
)
return
NULL
;
return
NULL
;
i
->
vfs_inode
.
i_version
=
1
;
i
node_set_iversion
(
&
i
->
vfs_inode
,
1
)
;
i
->
i_lc
=
NULL
;
i
->
i_lc
=
NULL
;
i
->
i_ext_bh
=
NULL
;
i
->
i_ext_bh
=
NULL
;
i
->
i_pa_cnt
=
0
;
i
->
i_pa_cnt
=
0
;
...
...
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