Some more nitpicking:
> +#include <linux/version.h>
not needed.
> +#include <linux/config.h>
dito.
> +static struct loop_func_table cryptoloop_funcs = {
> + number: LO_CRYPT_CRYPTOAPI,
> + init: cryptoloop_init,
> + ioctl: cryptoloop_ioctl,
> + transfer: cryptoloop_transfer,
> + release: cryptoloop_release,
> + owner: THIS_MODULE
> +};
please use C99-initializers.
> + printk(KERN_INFO "cryptoloop: loaded\n");
isn't this a bit verbose?
> + if (loop_unregister_transfer(LO_CRYPT_CRYPTOAPI))
how could this fail?
> + printk(KERN_ERR
> + "cryptoloop: unregistering transfer funcs failed\n");
> +
> + printk(KERN_INFO "cryptoloop: unloaded\n");
dito.
> + if (info->lo_encrypt_type == LO_CRYPT_CRYPTOAPI)
> + memcpy(info64->lo_crypt_name, info->lo_name, LO_NAME_SIZE);
> + else
> + memcpy(info64->lo_file_name, info->lo_name, LO_NAME_SIZE);
this special-casing sounds like a bad idea. I'd say anyone who wants
crypto support needs to use a losetup that uses the newstyle loop_info.
(Or did I get the context wrong? diff -p helps a lot if you don't have
a recent kernel tree nearby..)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/