summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-11-19Merge tag 'trace-seq-file-cleanup' of ↵Al Viro
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into for-next Pull the beginning of seq_file cleanup from Steven: "I'm looking to clean up the seq_file code and to eventually merge the trace_seq code with seq_file as well, since they basically do the same thing. Part of this process is to remove the return code of seq_printf() and friends as they are rather inconsistent. It is better to use the new function seq_has_overflowed() if you want to stop processing when the buffer is full. Note, if the buffer is full, the seq_file code will throw away the contents, allocate a bigger buffer, and then call your code again to fill in the data. The only thing that breaking out of the function early does is to save a little time which is probably never noticed. I started with patches from Joe Perches and modified them as well. There's many more places that need to be updated before we can convert seq_printf() and friends to return void. But this patch set introduces the seq_has_overflowed() and does some initial updates."
2014-11-19kill f_dentry macroAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19Merge branch 'for-lustre' into for-nextAl Viro
2014-11-19dcache: fix kmemcheck warning in switch_namesMikulas Patocka
This patch fixes kmemcheck warning in switch_names. The function switch_names swaps inline names of two dentries. It swaps full arrays d_iname, no matter how many bytes are really used by the strings. Reading data beyond string ends results in kmemcheck warning. We fix the bug by marking both arrays as fully initialized. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org # v3.15 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19new helper: audit_file()Al Viro
... for situations when we don't have any candidate in pathnames - basically, in descriptor-based syscalls. [Folded the build fix for !CONFIG_AUDITSYSCALL configs from Chen Gang] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19nfsd_vfs_write(): use file_inode()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19ncpfs: use file_inode()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19kill f_dentry usesAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19lockd: get rid of ->f_path.dentry->d_sbAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19procfs: get rid of ->f_dentryAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19nfsd: get rid of ->f_dentryAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19rpc_pipefs.c: get rid of f_dentryAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19afs_fsync: don't bother with ->f_path.dentryAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19cifs: get rid of ->f_path.dentry->d_sb uses, add a new helperAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19btrfs: get rid of f_dentry useAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19nfsd/nfsctl.c: new helperAl Viro
... to get from opened file on nfsctl to relevant struct net * Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19assorted conversions to %p[dD]Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19switch d_materialise_unique() users to d_splice_alias()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19merge d_materialise_unique() into d_splice_alias()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19Merge branch 'for-gfs2' into for-nextAl Viro
2014-11-19d_add_ci() should just accept a hashed exact match if it finds oneAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19gfs2_atomic_open(): simplify the use of finish_no_open()Al Viro
In ->atomic_open(inode, dentry, file, opened) calling finish_no_open(file, NULL) is equivalent to dget(dentry); return finish_no_open(file, dentry); No need to open-code that... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19gfs2_create_inode(): don't bother with d_splice_alias()Al Viro
dentry is always hashed and negative, inode - non-error, non-NULL and non-directory. In such conditions d_splice_alias() is equivalent to "d_instantiate(dentry, inode) and return NULL", which simplifies the downstream code and is consistent with the "have to create a new object" case. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19gfs2: bugger off early if O_CREAT open finds a directoryAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-05debugfs: Have debugfs_print_regs32() return voidJoe Perches
The seq_printf() will soon just return void, and seq_has_overflowed() should be used instead to see if the seq can no longer accept input. As the return value of debugfs_print_regs32() has no users and the seq_file descriptor should be checked with seq_has_overflowed() instead of return values of functions, it is better to just have debugfs_print_regs32() also return void. Link: http://lkml.kernel.org/p/2634b19eb1c04a9d31148c1fe6f1f3819be95349.1412031505.git.joe@perches.com Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Joe Perches <joe@perches.com> [ original change only updated seq_printf() return, added return of void to debugfs_print_regs32() as well ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-05fs: Convert show_fdinfo functions to voidJoe Perches
seq_printf functions shouldn't really check the return value. Checking seq_has_overflowed() occasionally is used instead. Update vfs documentation. Link: http://lkml.kernel.org/p/e37e6e7b76acbdcc3bb4ab2a57c8f8ca1ae11b9a.1412031505.git.joe@perches.com Cc: David S. Miller <davem@davemloft.net> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Joe Perches <joe@perches.com> [ did a few clean ups ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-05dlm: Use seq_puts() instead of seq_printf() for constant stringsJoe Perches
Convert the seq_printf output with constant strings to seq_puts. Link: http://lkml.kernel.org/p/b416b016f4a6e49115ba736cad6ea2709a8bc1c4.1412031505.git.joe@perches.com Cc: Christine Caulfield <ccaulfie@redhat.com> Cc: David Teigland <teigland@redhat.com> Cc: cluster-devel@redhat.com Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-05dlm: Remove seq_printf() return checks and use seq_has_overflowed()Joe Perches
The seq_printf() return is going away soon and users of it should check seq_has_overflowed() to see if the buffer is full and will not accept any more data. Convert functions returning int to void where seq_printf() is used. Link: http://lkml.kernel.org/p/43590057bcb83846acbbcc1fe641f792b2fb7773.1412031505.git.joe@perches.com Link: http://lkml.kernel.org/r/20141029220107.939492048@goodmis.org Acked-by: David Teigland <teigland@redhat.com> Cc: Christine Caulfield <ccaulfie@redhat.com> Cc: cluster-devel@redhat.com Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-05netfilter: Remove checks of seq_printf() return valuesSteven Rostedt (Red Hat)
The return value of seq_printf() is soon to be removed. Remove the checks from seq_printf() in favor of seq_has_overflowed(). Link: http://lkml.kernel.org/r/20141104142236.GA10239@salvia Acked-by: Pablo Neira Ayuso <pablo@netfilter.org> Cc: Patrick McHardy <kaber@trash.net> Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Cc: netfilter-devel@vger.kernel.org Cc: coreteam@netfilter.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-05netfilter: Convert print_tuple functions to return voidJoe Perches
Since adding a new function to seq_file (seq_has_overflowed()) there isn't any value for functions called from seq_show to return anything. Remove the int returns of the various print_tuple/<foo>_print_tuple functions. Link: http://lkml.kernel.org/p/f2e8cf8df433a197daa62cbaf124c900c708edc7.1412031505.git.joe@perches.com Cc: Pablo Neira Ayuso <pablo@netfilter.org> Cc: Patrick McHardy <kaber@trash.net> Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Cc: netfilter-devel@vger.kernel.org Cc: coreteam@netfilter.org Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-05netfilter: Remove return values for print_conntrack callbacksSteven Rostedt (Red Hat)
The seq_printf() and friends are having their return values removed. The print_conntrack() returns the result of seq_printf(), which is meaningless when seq_printf() returns void. Might as well remove the return values of print_conntrack() as well. Link: http://lkml.kernel.org/r/20141029220107.465008329@goodmis.org Acked-by: Pablo Neira Ayuso <pablo@netfilter.org> Cc: Patrick McHardy <kaber@trash.net> Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Cc: netfilter-devel@vger.kernel.org Cc: coreteam@netfilter.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-11-03deal with deadlock in d_walk()Al Viro
... by not hitting rename_retry for reasons other than rename having happened. In other words, do _not_ restart when finding that between unlocking the child and locking the parent the former got into __dentry_kill(). Skip the killed siblings instead... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03lustre: use is_root_inode()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03lustre: get rid of duplicate mountpoint checksAl Viro
VFS has already done them Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03kill ll_link_generic()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03ll_get_child_fid(): callers already have the childAl Viro
no need to bother with d_lookup() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03kill ll_rename_generic()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03kill ll_unlink_generic()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03kill ll_rmdir_generic()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03ll_new_inode(): don't bother with name - it's always &dentry->d_nameAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03kill ll_symlink_generic()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03kill ll_mkdir_generic()Al Viro
fold into ll_mkdir() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03kill ll_mknod_generic()Al Viro
just fold into ll_mknod() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03lustre: switch ll_release_openhandle() to struct inode *Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03lustre: use file_inode()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03lustre: use %p[dD]Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03lustre: opened file can't have negative dentryAl Viro
... 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>
2014-11-03ll_setxattr(): get rid of struct file on stackAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03lustre: switch ll_intent_file_open() to struct dentry *Al Viro
... 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>
2014-11-03move d_rcu from overlapping d_child to overlapping d_aliasAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>