]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
aio-remove-retry-based-aio-checkpatch-fixes
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 26 Mar 2013 23:26:16 +0000 (10:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Apr 2013 07:30:01 +0000 (18:30 +1100)
WARNING: Avoid CamelCase: <kiocbIsCancelled>
#527: FILE: fs/aio.c:1289:
+ if (unlikely(kiocbIsCancelled(req))) {

WARNING: braces {} are not necessary for any arm of this statement
#527: FILE: fs/aio.c:1289:
+ if (unlikely(kiocbIsCancelled(req))) {
[...]
+ } else {
[...]

WARNING: line over 80 characters
#543: FILE: fs/aio.c:1300:
+      ret == -ERESTARTNOHAND || ret == -ERESTART_RESTARTBLOCK))

total: 0 errors, 3 warnings, 628 lines checked

./patches/aio-remove-retry-based-aio.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Kent Overstreet <koverstreet@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/aio.c

index b9cc89c22b9f19c8298a739d55203cffc795d249..451e7f87ce1cd91fd8c8d925385499543769bba2 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1286,18 +1286,19 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
        if (ret)
                goto out_put_req;
 
-       if (unlikely(kiocbIsCancelled(req))) {
+       if (unlikely(kiocbIsCancelled(req)))
                ret = -EINTR;
-       } else {
+       else
                ret = req->ki_retry(req);
-       }
+
        if (ret != -EIOCBQUEUED) {
                /*
                 * There's no easy way to restart the syscall since other AIO's
                 * may be already running. Just fail this IO with EINTR.
                 */
                if (unlikely(ret == -ERESTARTSYS || ret == -ERESTARTNOINTR ||
-                            ret == -ERESTARTNOHAND || ret == -ERESTART_RESTARTBLOCK))
+                            ret == -ERESTARTNOHAND ||
+                            ret == -ERESTART_RESTARTBLOCK))
                        ret = -EINTR;
                aio_complete(req, ret, 0);
        }