Re: [PATCH 12/17] lockd: handle fl_notify callbacks

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

 



On Thu, Apr 05, 2007 at 07:41:02PM -0400, J. Bruce Fields wrote:
> +	if (block->b_fl)
> +		kfree(block->b_fl);

kfree(NULL) is fine.

> +static void
> +nlmsvc_update_deferred_block(struct nlm_block *block, struct file_lock *conf,
> +			     int result)
> +{
> +	block->b_flags |= B_GOT_CALLBACK;
> +	if (result == 0)
> +		block->b_granted = 1;
> +	else
> +		block->b_flags |= B_TOO_LATE;
> +	if (conf) {
> +		block->b_fl = kzalloc(sizeof(struct file_lock), GFP_KERNEL);
> +		if (block->b_fl)
> +			locks_copy_lock(block->b_fl, conf);
> +	}
> +}

Shouldn't there be a way to propagate errors back to the caller when
the kzalloc fails?

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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux