[PATCH] aio: Add few code style fixes

From: Liu Changdong
Date: Mon Nov 09 2015 - 11:04:18 EST


Add a blank line after declarations

Signed-off-by: Liu Changdong <liuchangdong007@xxxxxxxxx>
---
fs/aio.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/fs/aio.c b/fs/aio.c
index 155f842..48e4fb0 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -208,6 +208,7 @@ static struct file *aio_private_file(struct kioctx
*ctx, loff_t nr_pages)
struct file *file;
struct path path;
struct inode *inode = alloc_anon_inode(aio_mnt->mnt_sb);
+
if (IS_ERR(inode))
return ERR_CAST(inode);

@@ -269,6 +270,7 @@ __initcall(aio_setup);
static void put_aio_ring_file(struct kioctx *ctx)
{
struct file *aio_ring_file = ctx->aio_ring_file;
+
if (aio_ring_file) {
truncate_setsize(aio_ring_file->f_inode, 0);

@@ -293,6 +295,7 @@ static void aio_free_ring(struct kioctx *ctx)

for (i = 0; i < ctx->nr_pages; i++) {
struct page *page;
+
pr_debug("pid(%d) [%d] page->count=%d\n", current->pid, i,
page_count(ctx->ring_pages[i]));
page = ctx->ring_pages[i];
@@ -475,6 +478,7 @@ static int aio_setup_ring(struct kioctx *ctx)

for (i = 0; i < nr_pages; i++) {
struct page *page;
+
page = find_or_create_page(file->f_inode->i_mapping,
i, GFP_HIGHUSER | __GFP_ZERO);
if (!page)
@@ -1352,6 +1356,7 @@ out:
SYSCALL_DEFINE1(io_destroy, aio_context_t, ctx)
{
struct kioctx *ioctx = lookup_ioctx(ctx);
+
if (likely(NULL != ioctx)) {
struct ctx_rq_wait wait;
int ret;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/