Skip to content

Commit

Permalink
staging: lustre: fix return type of lo_release.
Browse files Browse the repository at this point in the history
The return type of block_device_operations.release() changed to void in commit
db2a144.

Found with the following Coccinelle patch:
<smpl>
@has_release_func@
identifier i;
identifier release_func;
@@
struct block_device_operations i = {
 .release = release_func
};

@Depends on has_release_func@
identifier has_release_func.release_func;
@@
- int
+ void
release_func(...) {
...
- return ...;
}
</smpl>

Signed-off-by: Cyril Roelandt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Steap authored and gregkh committed May 16, 2013
1 parent 93961cd commit f1e2f53
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/lustre/lustre/llite/lloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,15 +596,13 @@ static int lo_open(struct block_device *bdev, fmode_t mode)
return 0;
}

static int lo_release(struct gendisk *disk, fmode_t mode)
static void lo_release(struct gendisk *disk, fmode_t mode)
{
struct lloop_device *lo = disk->private_data;

mutex_lock(&lo->lo_ctl_mutex);
--lo->lo_refcnt;
mutex_unlock(&lo->lo_ctl_mutex);

return 0;
}

/* lloop device node's ioctl function. */
Expand Down

0 comments on commit f1e2f53

Please sign in to comment.