Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
b1330031
Commit
b1330031
authored
Sep 04, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for_linus' of
git://git.linux-nfs.org/pub/linux/nfs-2.6
parents
ea3c4b12
1b3b4a1a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
14 deletions
+59
-14
fs/nfs/file.c
fs/nfs/file.c
+1
-1
fs/nfs/namespace.c
fs/nfs/namespace.c
+1
-1
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+2
-2
fs/nfs/super.c
fs/nfs/super.c
+10
-10
fs/nfs/write.c
fs/nfs/write.c
+44
-0
include/linux/nfs_fs.h
include/linux/nfs_fs.h
+1
-0
No files found.
fs/nfs/file.c
View file @
b1330031
...
...
@@ -316,7 +316,7 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset)
if
(
offset
!=
0
)
return
;
/* Cancel any unstarted writes on this page */
nfs_wb_page_
priority
(
page
->
mapping
->
host
,
page
,
FLUSH_INVALIDATE
);
nfs_wb_page_
cancel
(
page
->
mapping
->
host
,
page
);
}
static
int
nfs_release_page
(
struct
page
*
page
,
gfp_t
gfp
)
...
...
fs/nfs/namespace.c
View file @
b1330031
...
...
@@ -176,7 +176,7 @@ static void nfs_expire_automounts(struct work_struct *work)
void
nfs_release_automount_timer
(
void
)
{
if
(
list_empty
(
&
nfs_automount_list
))
cancel_delayed_work
_sync
(
&
nfs_automount_task
);
cancel_delayed_work
(
&
nfs_automount_task
);
}
/*
...
...
fs/nfs/nfs4proc.c
View file @
b1330031
...
...
@@ -646,7 +646,7 @@ static int _nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state
rcu_read_lock
();
delegation
=
rcu_dereference
(
NFS_I
(
state
->
inode
)
->
delegation
);
if
(
delegation
!=
NULL
&&
(
delegation
->
flags
&
NFS_DELEGATION_NEED_RECLAIM
)
!=
0
)
delegation_type
=
delegation
->
flags
;
delegation_type
=
delegation
->
type
;
rcu_read_unlock
();
opendata
->
o_arg
.
u
.
delegation_type
=
delegation_type
;
status
=
nfs4_open_recover
(
opendata
,
state
);
...
...
@@ -1434,7 +1434,7 @@ nfs4_atomic_open(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
}
res
=
d_add_unique
(
dentry
,
igrab
(
state
->
inode
));
if
(
res
!=
NULL
)
dentry
=
res
;
path
.
dentry
=
res
;
nfs4_intent_set_file
(
nd
,
&
path
,
state
);
return
res
;
}
...
...
fs/nfs/super.c
View file @
b1330031
...
...
@@ -911,13 +911,13 @@ static int nfs_parse_mount_options(char *raw,
kfree
(
string
);
switch
(
token
)
{
case
Opt_udp
:
case
Opt_
xprt_
udp
:
mnt
->
flags
&=
~
NFS_MOUNT_TCP
;
mnt
->
nfs_server
.
protocol
=
IPPROTO_UDP
;
mnt
->
timeo
=
7
;
mnt
->
retrans
=
5
;
break
;
case
Opt_tcp
:
case
Opt_
xprt_
tcp
:
mnt
->
flags
|=
NFS_MOUNT_TCP
;
mnt
->
nfs_server
.
protocol
=
IPPROTO_TCP
;
mnt
->
timeo
=
600
;
...
...
@@ -936,10 +936,10 @@ static int nfs_parse_mount_options(char *raw,
kfree
(
string
);
switch
(
token
)
{
case
Opt_udp
:
case
Opt_
xprt_
udp
:
mnt
->
mount_server
.
protocol
=
IPPROTO_UDP
;
break
;
case
Opt_tcp
:
case
Opt_
xprt_
tcp
:
mnt
->
mount_server
.
protocol
=
IPPROTO_TCP
;
break
;
default:
...
...
@@ -1153,20 +1153,20 @@ static int nfs_validate_mount_data(struct nfs_mount_data **options,
c
=
strchr
(
dev_name
,
':'
);
if
(
c
==
NULL
)
return
-
EINVAL
;
len
=
c
-
dev_name
-
1
;
len
=
c
-
dev_name
;
if
(
len
>
sizeof
(
data
->
hostname
))
return
-
E
INVAL
;
return
-
E
NAMETOOLONG
;
strncpy
(
data
->
hostname
,
dev_name
,
len
);
args
.
nfs_server
.
hostname
=
data
->
hostname
;
c
++
;
if
(
strlen
(
c
)
>
NFS_MAXPATHLEN
)
return
-
E
INVAL
;
return
-
E
NAMETOOLONG
;
args
.
nfs_server
.
export_path
=
c
;
status
=
nfs_try_mount
(
&
args
,
mntfh
);
if
(
status
)
return
-
EINVAL
;
return
status
;
/*
* Translate to nfs_mount_data, which nfs_fill_super
...
...
@@ -1677,7 +1677,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
/* while calculating len, pretend ':' is '\0' */
len
=
c
-
dev_name
;
if
(
len
>
NFS4_MAXNAMLEN
)
return
-
E
INVAL
;
return
-
E
NAMETOOLONG
;
*
hostname
=
kzalloc
(
len
,
GFP_KERNEL
);
if
(
*
hostname
==
NULL
)
return
-
ENOMEM
;
...
...
@@ -1686,7 +1686,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
c
++
;
/* step over the ':' */
len
=
strlen
(
c
);
if
(
len
>
NFS4_MAXPATHLEN
)
return
-
E
INVAL
;
return
-
E
NAMETOOLONG
;
*
mntpath
=
kzalloc
(
len
+
1
,
GFP_KERNEL
);
if
(
*
mntpath
==
NULL
)
return
-
ENOMEM
;
...
...
fs/nfs/write.c
View file @
b1330031
...
...
@@ -1396,6 +1396,50 @@ out:
return
ret
;
}
int
nfs_wb_page_cancel
(
struct
inode
*
inode
,
struct
page
*
page
)
{
struct
nfs_page
*
req
;
loff_t
range_start
=
page_offset
(
page
);
loff_t
range_end
=
range_start
+
(
loff_t
)(
PAGE_CACHE_SIZE
-
1
);
struct
writeback_control
wbc
=
{
.
bdi
=
page
->
mapping
->
backing_dev_info
,
.
sync_mode
=
WB_SYNC_ALL
,
.
nr_to_write
=
LONG_MAX
,
.
range_start
=
range_start
,
.
range_end
=
range_end
,
};
int
ret
=
0
;
BUG_ON
(
!
PageLocked
(
page
));
for
(;;)
{
req
=
nfs_page_find_request
(
page
);
if
(
req
==
NULL
)
goto
out
;
if
(
test_bit
(
PG_NEED_COMMIT
,
&
req
->
wb_flags
))
{
nfs_release_request
(
req
);
break
;
}
if
(
nfs_lock_request_dontget
(
req
))
{
nfs_inode_remove_request
(
req
);
/*
* In case nfs_inode_remove_request has marked the
* page as being dirty
*/
cancel_dirty_page
(
page
,
PAGE_CACHE_SIZE
);
nfs_unlock_request
(
req
);
break
;
}
ret
=
nfs_wait_on_request
(
req
);
if
(
ret
<
0
)
goto
out
;
}
if
(
!
PagePrivate
(
page
))
return
0
;
ret
=
nfs_sync_mapping_wait
(
page
->
mapping
,
&
wbc
,
FLUSH_INVALIDATE
);
out:
return
ret
;
}
int
nfs_wb_page_priority
(
struct
inode
*
inode
,
struct
page
*
page
,
int
how
)
{
loff_t
range_start
=
page_offset
(
page
);
...
...
include/linux/nfs_fs.h
View file @
b1330031
...
...
@@ -431,6 +431,7 @@ extern int nfs_sync_mapping_range(struct address_space *, loff_t, loff_t, int);
extern
int
nfs_wb_all
(
struct
inode
*
inode
);
extern
int
nfs_wb_page
(
struct
inode
*
inode
,
struct
page
*
page
);
extern
int
nfs_wb_page_priority
(
struct
inode
*
inode
,
struct
page
*
page
,
int
how
);
extern
int
nfs_wb_page_cancel
(
struct
inode
*
inode
,
struct
page
*
page
);
#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
extern
int
nfs_commit_inode
(
struct
inode
*
,
int
);
extern
struct
nfs_write_data
*
nfs_commit_alloc
(
void
);
...
...
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