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
fb8a1f11
Commit
fb8a1f11
authored
Mar 11, 2009
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFS: cleanup - remove struct nfs_inode->ncommit
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
a65318bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
12 deletions
+17
-12
fs/nfs/inode.c
fs/nfs/inode.c
+0
-1
fs/nfs/write.c
fs/nfs/write.c
+16
-9
include/linux/nfs_fs.h
include/linux/nfs_fs.h
+1
-2
No files found.
fs/nfs/inode.c
View file @
fb8a1f11
...
...
@@ -1345,7 +1345,6 @@ static void init_once(void *foo)
INIT_LIST_HEAD
(
&
nfsi
->
access_cache_entry_lru
);
INIT_LIST_HEAD
(
&
nfsi
->
access_cache_inode_lru
);
INIT_RADIX_TREE
(
&
nfsi
->
nfs_page_tree
,
GFP_ATOMIC
);
nfsi
->
ncommit
=
0
;
nfsi
->
npages
=
0
;
atomic_set
(
&
nfsi
->
silly_count
,
1
);
INIT_HLIST_HEAD
(
&
nfsi
->
silly_list
);
...
...
fs/nfs/write.c
View file @
fb8a1f11
...
...
@@ -404,7 +404,6 @@ nfs_mark_request_commit(struct nfs_page *req)
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
spin_lock
(
&
inode
->
i_lock
);
nfsi
->
ncommit
++
;
set_bit
(
PG_CLEAN
,
&
(
req
)
->
wb_flags
);
radix_tree_tag_set
(
&
nfsi
->
nfs_page_tree
,
req
->
wb_index
,
...
...
@@ -523,6 +522,12 @@ static void nfs_cancel_commit_list(struct list_head *head)
}
}
static
int
nfs_need_commit
(
struct
nfs_inode
*
nfsi
)
{
return
radix_tree_tagged
(
&
nfsi
->
nfs_page_tree
,
NFS_PAGE_TAG_COMMIT
);
}
#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
/*
* nfs_scan_commit - Scan an inode for commit requests
...
...
@@ -538,16 +543,18 @@ static int
nfs_scan_commit
(
struct
inode
*
inode
,
struct
list_head
*
dst
,
pgoff_t
idx_start
,
unsigned
int
npages
)
{
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
int
res
=
0
;
if
(
nfsi
->
ncommit
!=
0
)
{
res
=
nfs_scan_list
(
nfsi
,
dst
,
idx_start
,
npages
,
NFS_PAGE_TAG_COMMIT
);
nfsi
->
ncommit
-=
res
;
}
return
res
;
if
(
!
nfs_need_commit
(
nfsi
))
return
0
;
return
nfs_scan_list
(
nfsi
,
dst
,
idx_start
,
npages
,
NFS_PAGE_TAG_COMMIT
);
}
#else
static
inline
int
nfs_need_commit
(
struct
nfs_inode
*
nfsi
)
{
return
0
;
}
static
inline
int
nfs_scan_commit
(
struct
inode
*
inode
,
struct
list_head
*
dst
,
pgoff_t
idx_start
,
unsigned
int
npages
)
{
return
0
;
...
...
@@ -820,7 +827,7 @@ static int nfs_write_rpcsetup(struct nfs_page *req,
data
->
args
.
stable
=
NFS_UNSTABLE
;
if
(
how
&
FLUSH_STABLE
)
{
data
->
args
.
stable
=
NFS_DATA_SYNC
;
if
(
!
NFS_I
(
inode
)
->
ncommit
)
if
(
!
nfs_need_commit
(
NFS_I
(
inode
))
)
data
->
args
.
stable
=
NFS_FILE_SYNC
;
}
...
...
include/linux/nfs_fs.h
View file @
fb8a1f11
...
...
@@ -166,8 +166,7 @@ struct nfs_inode {
*/
struct
radix_tree_root
nfs_page_tree
;
unsigned
long
ncommit
,
npages
;
unsigned
long
npages
;
/* Open contexts for shared mmap writes */
struct
list_head
open_files
;
...
...
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