]> git.baikalelectronics.ru Git - kernel.git/commit
fanotify: reorganize loop in fanotify_read()
authorJan Kara <jack@suse.cz>
Thu, 3 Apr 2014 21:46:35 +0000 (14:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:20:51 +0000 (16:20 -0700)
commit46e8d877fcabd66a3b6c3ddecb844863a5d5bae1
treed73ebf86269bf349e2949dfe14dbb2f36f179a59
parent29e2f35e3bf73ba3e0681cb39e73cab5f5f64c5f
fanotify: reorganize loop in fanotify_read()

Swap the error / "read ok" branches in the main loop of fanotify_read().
We will grow the "read ok" part in the next patch and this makes the
indentation easier.  Also it is more common to have error conditions
inside an 'if' instead of the fast path.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/notify/fanotify/fanotify_user.c