projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7067b2
)
nfs: fix open(O_RDONLY|O_TRUNC) in NFS4.0
author
Nadav Shemer
<
[email protected]
>
Sun, 21 Jul 2013 14:21:43 +0000
(17:21 +0300)
committer
Trond Myklebust
<
[email protected]
>
Tue, 23 Jul 2013 22:18:53 +0000
(18:18 -0400)
nfs4_proc_setattr removes ATTR_OPEN from sattr->ia_valid, but later
nfs4_do_setattr checks for it
Signed-off-by: Nadav Shemer <
[email protected]
>
Reviewed-by: Jeff Layton <
[email protected]
>
Signed-off-by: Trond Myklebust <
[email protected]
>
fs/nfs/nfs4proc.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4proc.c
b/fs/nfs/nfs4proc.c
index cf11799297c42d50dc33aca126e6da11f033ce4b..1bf291f03c619dd023cd17d47faefabbf568e218 100644
(file)
--- a/
fs/nfs/nfs4proc.c
+++ b/
fs/nfs/nfs4proc.c
@@
-2940,10
+2940,10
@@
nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
/* Deal with open(O_TRUNC) */
if (sattr->ia_valid & ATTR_OPEN)
- sattr->ia_valid &= ~(ATTR_MTIME|ATTR_CTIME
|ATTR_OPEN
);
+ sattr->ia_valid &= ~(ATTR_MTIME|ATTR_CTIME);
/* Optimization: if the end result is no change, don't RPC */
- if ((sattr->ia_valid & ~(ATTR_FILE)) == 0)
+ if ((sattr->ia_valid & ~(ATTR_FILE
|ATTR_OPEN
)) == 0)
return 0;
/* Search for an existing open(O_WRITE) file */