projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25a1a62
)
NFSv4: nfs4_open_done first must check that GETATTR decoded a file type
author
Trond Myklebust
<Trond.Myklebust@netapp.com>
Wed, 3 Oct 2012 00:09:00 +0000
(17:09 -0700)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Wed, 3 Oct 2012 00:09:00 +0000
(17:09 -0700)
...before it can check the validity of that file type.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/nfs/nfs4proc.c
b/fs/nfs/nfs4proc.c
index 21cfac7c2ff80adba52b7d05a3262e006fb8a9ce..68438aa4f08ede77f5aa375bac36981374655bb2 100644
(file)
--- a/
fs/nfs/nfs4proc.c
+++ b/
fs/nfs/nfs4proc.c
@@
-1537,7
+1537,8
@@
static void nfs4_open_done(struct rpc_task *task, void *calldata)
return;
if (task->tk_status == 0) {
- switch (data->o_res.f_attr->mode & S_IFMT) {
+ if (data->o_res.f_attr->valid & NFS_ATTR_FATTR_TYPE) {
+ switch (data->o_res.f_attr->mode & S_IFMT) {
case S_IFREG:
break;
case S_IFLNK:
@@
-1548,6
+1549,7
@@
static void nfs4_open_done(struct rpc_task *task, void *calldata)
break;
default:
data->rpc_status = -ENOTDIR;
+ }
}
renew_lease(data->o_res.server, data->timestamp);
if (!(data->o_res.rflags & NFS4_OPEN_RESULT_CONFIRM))