All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] aio: Add few code style fixes
@ 2015-11-12 15:06 ` 刘长冬
  0 siblings, 0 replies; 5+ messages in thread
From: 刘长冬 @ 2015-11-12 15:06 UTC (permalink / raw)
  To: bcrl, viro, linux-aio, linux-fsdevel, linux-kernel

>From 1609d68dee344925d182631922cd98790109588b Mon Sep 17 00:00:00 2001
From: Liu Changdong <liuchangdong007@gmail.com>
Date: Tue, 10 Nov 2015 00:04:18 +0800
Subject: [PATCH] aio: Add few code style fixes

Add a blank line after declarations

Signed-off-by: Liu Changdong <liuchangdong007@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] aio: Add few code style fixes
@ 2015-11-12 15:06 ` 刘长冬
  0 siblings, 0 replies; 5+ messages in thread
From: 刘长冬 @ 2015-11-12 15:06 UTC (permalink / raw)
  To: bcrl, viro, linux-aio, linux-fsdevel, linux-kernel

>From 1609d68dee344925d182631922cd98790109588b Mon Sep 17 00:00:00 2001
From: Liu Changdong <liuchangdong007@gmail.com>
Date: Tue, 10 Nov 2015 00:04:18 +0800
Subject: [PATCH] aio: Add few code style fixes

Add a blank line after declarations

Signed-off-by: Liu Changdong <liuchangdong007@gmail.com>
---
 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, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] aio: Add few code style fixes
  2015-11-11 15:28 刘长冬
@ 2015-11-11 16:33   ` Benjamin LaHaise
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin LaHaise @ 2015-11-11 16:33 UTC (permalink / raw)
  To: 刘长冬; +Cc: viro, linux-aio, linux-fsdevel, linux-kernel

On Wed, Nov 11, 2015 at 11:28:08PM +0800, 刘长冬 wrote:
> >From 1609d68dee344925d182631922cd98790109588b Mon Sep 17 00:00:00 2001
> From: Liu Changdong <liuchangdong007@gmail.com>
> Date: Tue, 10 Nov 2015 00:04:18 +0800
> Subject: [PATCH] aio: Add few code style fixes
> 
> Add a blank line after declarations
> 
> Signed-off-by: Liu Changdong <liuchangdong007@gmail.com>
> ---
>  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);

Your patch is white space damaged.  Please resend in plain text without 
HTML in a format that can be applied using git-am, and test that by sending 
the email to yourself before reposting.

		-ben

> @@ -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

-- 
"Thought is the essence of where you are now."

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] aio: Add few code style fixes
@ 2015-11-11 16:33   ` Benjamin LaHaise
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin LaHaise @ 2015-11-11 16:33 UTC (permalink / raw)
  To: 刘长冬; +Cc: viro, linux-aio, linux-fsdevel, linux-kernel

On Wed, Nov 11, 2015 at 11:28:08PM +0800, 刘长冬 wrote:
> >From 1609d68dee344925d182631922cd98790109588b Mon Sep 17 00:00:00 2001
> From: Liu Changdong <liuchangdong007@gmail.com>
> Date: Tue, 10 Nov 2015 00:04:18 +0800
> Subject: [PATCH] aio: Add few code style fixes
> 
> Add a blank line after declarations
> 
> Signed-off-by: Liu Changdong <liuchangdong007@gmail.com>
> ---
>  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);

Your patch is white space damaged.  Please resend in plain text without 
HTML in a format that can be applied using git-am, and test that by sending 
the email to yourself before reposting.

		-ben

> @@ -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

-- 
"Thought is the essence of where you are now."

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] aio: Add few code style fixes
@ 2015-11-11 15:28 刘长冬
  2015-11-11 16:33   ` Benjamin LaHaise
  0 siblings, 1 reply; 5+ messages in thread
From: 刘长冬 @ 2015-11-11 15:28 UTC (permalink / raw)
  To: bcrl, viro, linux-aio, linux-fsdevel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1603 bytes --]

>From 1609d68dee344925d182631922cd98790109588b Mon Sep 17 00:00:00 2001
From: Liu Changdong <liuchangdong007@gmail.com>
Date: Tue, 10 Nov 2015 00:04:18 +0800
Subject: [PATCH] aio: Add few code style fixes

Add a blank line after declarations

Signed-off-by: Liu Changdong <liuchangdong007@gmail.com>
---
 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

[-- Attachment #2: Type: text/html, Size: 3452 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-12 15:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12 15:06 [PATCH] aio: Add few code style fixes 刘长冬
2015-11-12 15:06 ` 刘长冬
  -- strict thread matches above, loose matches on Subject: below --
2015-11-11 15:28 刘长冬
2015-11-11 16:33 ` Benjamin LaHaise
2015-11-11 16:33   ` Benjamin LaHaise

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.