diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 0a7bbdc4a10a..4a73f5b2546f 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -106,27 +106,25 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o | |||
106 | open->op_fname.len, &open->op_iattr, | 106 | open->op_fname.len, &open->op_iattr, |
107 | &resfh, open->op_createmode, | 107 | &resfh, open->op_createmode, |
108 | (u32 *)open->op_verf.data, &open->op_truncate); | 108 | (u32 *)open->op_verf.data, &open->op_truncate); |
109 | } | 109 | } else { |
110 | else { | ||
111 | status = nfsd_lookup(rqstp, current_fh, | 110 | status = nfsd_lookup(rqstp, current_fh, |
112 | open->op_fname.data, open->op_fname.len, &resfh); | 111 | open->op_fname.data, open->op_fname.len, &resfh); |
113 | fh_unlock(current_fh); | 112 | fh_unlock(current_fh); |
114 | } | 113 | } |
114 | if (status) | ||
115 | goto out; | ||
115 | 116 | ||
116 | if (!status) { | 117 | set_change_info(&open->op_cinfo, current_fh); |
117 | set_change_info(&open->op_cinfo, current_fh); | ||
118 | 118 | ||
119 | /* set reply cache */ | 119 | /* set reply cache */ |
120 | fh_dup2(current_fh, &resfh); | 120 | fh_dup2(current_fh, &resfh); |
121 | open->op_stateowner->so_replay.rp_openfh_len = | 121 | open->op_stateowner->so_replay.rp_openfh_len = resfh.fh_handle.fh_size; |
122 | resfh.fh_handle.fh_size; | 122 | memcpy(open->op_stateowner->so_replay.rp_openfh, |
123 | memcpy(open->op_stateowner->so_replay.rp_openfh, | 123 | &resfh.fh_handle.fh_base, resfh.fh_handle.fh_size); |
124 | &resfh.fh_handle.fh_base, | ||
125 | resfh.fh_handle.fh_size); | ||
126 | 124 | ||
127 | status = do_open_permission(rqstp, current_fh, open, MAY_NOP); | 125 | status = do_open_permission(rqstp, current_fh, open, MAY_NOP); |
128 | } | ||
129 | 126 | ||
127 | out: | ||
130 | fh_put(&resfh); | 128 | fh_put(&resfh); |
131 | return status; | 129 | return status; |
132 | } | 130 | } |