Re: [PATCH v4 014/100] nfsd: set stateid access and deny bits in nfs4_get_vfs_file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -3343,20 +3347,15 @@ out:
>  static __be32
>  nfs4_upgrade_open(struct svc_rqst *rqstp, struct nfs4_file *fp, struct svc_fh *cur_fh, struct nfs4_ol_stateid *stp, struct nfsd4_open *open)
>  {
> -	u32 op_share_access = open->op_share_access;
>  	__be32 status;
>  
> -	if (!test_access(op_share_access, stp))
> -		status = nfs4_get_vfs_file(rqstp, fp, cur_fh, open);
> +	if (!test_access(open->op_share_access, stp))
> +		status = nfs4_get_vfs_file(rqstp, fp, cur_fh, stp, open);
>  	else
>  		status = nfsd4_truncate(rqstp, cur_fh, open);
>  
>  	if (status)
>  		return status;
> -
> -	/* remember the open */
> -	set_access(op_share_access, stp);
> -	set_deny(open->op_share_deny, stp);
>  	return nfs_ok;

This function is trivial enough now to be merged into the only caller,
especially as that open actually has another call to nfs4_get_vfs_file
right next to it in another branch.


>  	} else {
> -		status = nfs4_get_vfs_file(rqstp, fp, current_fh, open);
> -		if (status)
> -			goto out;
>  		stp = open->op_stp;
>  		open->op_stp = NULL;
>  		init_open_stateid(stp, fp, open);
> +		status = nfs4_get_vfs_file(rqstp, fp, current_fh, stp, open);
> +		if (status) {
> +			release_open_stateid(stp);
> +			goto out;
> +		}

I can't find a place where we set the access bits before here.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux