summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/state.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r--fs/nfsd/state.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index 7731a75971d..84579c86b13 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -379,7 +379,7 @@ static inline struct file *find_any_file(struct nfs4_file *f)
{
if (f->fi_fds[O_RDWR])
return f->fi_fds[O_RDWR];
- else if (f->fi_fds[O_RDWR])
+ else if (f->fi_fds[O_WRONLY])
return f->fi_fds[O_WRONLY];
else
return f->fi_fds[O_RDONLY];