浏览代码

nfsd4: typo fix in find_any_file

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
J. Bruce Fields 14 年之前
父节点
当前提交
18608ad49c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/nfsd/state.h

+ 1 - 1
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])
 	if (f->fi_fds[O_RDWR])
 		return 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];
 		return f->fi_fds[O_WRONLY];
 	else
 	else
 		return f->fi_fds[O_RDONLY];
 		return f->fi_fds[O_RDONLY];