X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fllite%2Flloop.c;h=cef0de614da3214078774445ab0d14ec7886e4e3;hp=1f5c6de98f652329483bdb4bfa45909b488c11be;hb=96daa1b1ec0b4c9c61d30ff18a32f015a14fd528;hpb=d5a07cd08ad07fe0de0c5bda2b3b65c36461f601 diff --git a/lustre/llite/lloop.c b/lustre/llite/lloop.c index 1f5c6de..cef0de6 100644 --- a/lustre/llite/lloop.c +++ b/lustre/llite/lloop.c @@ -608,15 +608,21 @@ static int lo_open(struct block_device *bdev, fmode_t mode) return 0; } -static int lo_release(struct gendisk *disk, fmode_t mode) +#ifdef HAVE_BLKDEV_RELEASE_RETURN_INT +static int +#else +static void +#endif +lo_release(struct gendisk *disk, fmode_t mode) { - struct lloop_device *lo = disk->private_data; + struct lloop_device *lo = disk->private_data; mutex_lock(&lo->lo_ctl_mutex); - --lo->lo_refcnt; + --lo->lo_refcnt; mutex_unlock(&lo->lo_ctl_mutex); - - return 0; +#ifdef HAVE_BLKDEV_RELEASE_RETURN_INT + return 0; +#endif } /* lloop device node's ioctl function. */