> + ret = devcgroup_check_permission( > + DEVCG_DEV_BLOCK, MAJOR(dev), MINOR(dev), > + ((mode & BLK_OPEN_READ) ? DEVCG_ACC_READ : 0) | > + ((mode & BLK_OPEN_WRITE) ? DEVCG_ACC_WRITE : 0)); Somewhat weird formatting here with DEVCG_DEV_BLOCK not on the same line as the opening brace and the extra indentation after the |. I would have expected something like: ret = devcgroup_check_permission(DEVCG_DEV_BLOCK, MAJOR(dev), MINOR(dev), ((mode & BLK_OPEN_READ) ? DEVCG_ACC_READ : 0) | ((mode & BLK_OPEN_WRITE) ? DEVCG_ACC_WRITE : 0)); Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>