seq_file: Rename seq_overflow() to seq_has_overflowed() and make public

The return values of seq_printf/puts/putc are frequently misused.

Start down a path to remove all the return value uses of these
functions.

Move the seq_overflow() to a global inlined function called
seq_has_overflowed() that can be used by the users of seq_file() calls.

Update the documentation to not show return types for seq_printf
et al.  Add a description of seq_has_overflowed().

Link: http://lkml.kernel.org/p/848ac7e3d1c31cddf638a8526fa3c59fa6fdeb8a.1412031505.git.joe@perches.com

Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Joe Perches <joe@perches.com>
[ Reworked the original patch from Joe ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
vfs: make first argument of dir_context.actor typed

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
new helper: is_root_inode()

replace open-coded instances

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
GFS2: directly return gfs2_dir_check()

No need to store gfs2_dir_check result and test it before returning.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
GFS2: Set of distributed preferences for rgrps

This patch tries to use the journal numbers to evenly distribute
which node prefers which resource group for block allocations. This
is to help performance.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
GFS2: Only increase rs_sizehint

If an application does a sequence of (1) big write, (2) little write
we don't necessarily want to reset the size hint based on the smaller
size. The fact that they did any big writes implies they may do more,
and therefore we should try to allocate bigger block reservations, even
if the last few were small writes. Therefore this patch changes function
gfs2_size_hint so that the size hint can only grow; it cannot shrink.
This is especially important where there are multiple writers.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
GFS2: If we use up our block reservation, request more next time

If we run out of blocks for a given multi-block allocation, we obviously
did not reserve enough. We should reserve more blocks for the next
reservation to reduce fragmentation. This patch increases the size hint
for reservations when they run out.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
move d_rcu from overlapping d_child to overlapping d_alias

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lustre: switch ll_intent_file_open() to struct dentry *

... because fake struct file is wrong.

ll_prep_inode() in there is an atrocity - despite passing a pointer to
inode by address, it actually only uses the value when that value is
non-NULL, as it will be here.

Oh, and ->d_parent of anything is never NULL.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
ll_setxattr(): get rid of struct file on stack

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lustre: opened file can't have negative dentry

... and ll_md_close() gets inode already equal to file_inode(file),
along with ll_file_release()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lustre: use %p[dD]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lustre: use file_inode()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lustre: switch ll_release_openhandle() to struct inode *

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kill ll_mknod_generic()

just fold into ll_mknod()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kill ll_mkdir_generic()

fold into ll_mkdir()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kill ll_symlink_generic()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
ll_new_inode(): don't bother with name - it's always &dentry->d_name

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kill ll_rmdir_generic()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kill ll_unlink_generic()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>