Re: [PATCH 1/6] NFSD: Put file after ima_file_check fail in nfsd_open()

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

 



> +	file = dentry_open(&path, flags, current_cred());
> +	if (IS_ERR(file)) {
> +		host_err = PTR_ERR(file);
>  	} else {

The is_err case should have a

	goto out_nfserr;

which would allow you to drop the following indentation if you
change the whole function anyway.

>  		if (may_flags & NFSD_MAY_64BIT_COOKIE)
> -			(*filp)->f_mode |= FMODE_64BITHASH;
> +			(file)->f_mode |= FMODE_64BITHASH;
>  		else
> -			(*filp)->f_mode |= FMODE_32BITHASH;
> +			(file)->f_mode |= FMODE_32BITHASH;

no need for the braces around file 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