|
@@ -1523,6 +1523,8 @@ static int _nfs4_proc_open(struct nfs4_opendata *data)
|
|
|
nfs_post_op_update_inode(dir, o_res->dir_attr);
|
|
|
} else
|
|
|
nfs_refresh_inode(dir, o_res->dir_attr);
|
|
|
+ if ((o_res->rflags & NFS4_OPEN_RESULT_LOCKTYPE_POSIX) == 0)
|
|
|
+ server->caps &= ~NFS_CAP_POSIX_LOCK;
|
|
|
if(o_res->rflags & NFS4_OPEN_RESULT_CONFIRM) {
|
|
|
status = _nfs4_proc_open_confirm(data);
|
|
|
if (status != 0)
|
|
@@ -1664,7 +1666,7 @@ static int _nfs4_do_open(struct inode *dir, struct path *path, fmode_t fmode, in
|
|
|
status = PTR_ERR(state);
|
|
|
if (IS_ERR(state))
|
|
|
goto err_opendata_put;
|
|
|
- if ((opendata->o_res.rflags & NFS4_OPEN_RESULT_LOCKTYPE_POSIX) != 0)
|
|
|
+ if (server->caps & NFS_CAP_POSIX_LOCK)
|
|
|
set_bit(NFS_STATE_POSIX_LOCKS, &state->flags);
|
|
|
nfs4_opendata_put(opendata);
|
|
|
nfs4_put_state_owner(sp);
|