Re: [PATCH v2] Revert "Staging : lustre: Struct file_operations should be const"

From: Sudip Mukherjee
Date: Mon Aug 03 2015 - 01:29:25 EST


On Sun, Aug 02, 2015 at 11:04:22PM +0530, Shraddha Barke wrote:

Your subject says 'Revert "Staging : lustre: Struct file_operations
should be const"'. This patch reverts which commit?

> Declare the file_operations structure ll_file_operations as const, as done
> elsewhere in the kernel, as there are no modifications to its fields.
>
> Problem found using checkpatch.
>
> Signed-off-by: Shraddha Barke <shraddha.6596@xxxxxxxxx>
> ---
> Changes in v2:
> - Make the commit message more clearer.
>
> drivers/staging/lustre/lustre/llite/file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
> index 369a722..dcd0c6d 100644
> --- a/drivers/staging/lustre/lustre/llite/file.c
> +++ b/drivers/staging/lustre/lustre/llite/file.c
> @@ -3116,7 +3116,7 @@ int ll_inode_permission(struct inode *inode, int mask)
> }
>
> /* -o localflock - only provides locally consistent flock locks */
> -const struct file_operations ll_file_operations = {
> +struct file_operations ll_file_operations = {
Your commit message says "Declare the file_operations structure
ll_file_operations as const" but your patch is removing the const.

regards
sudip

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