Revision 33844e665104b169a3a7732bdcddb40e4f82b335 authored by Al Viro on 22 December 2016, 02:55:02 UTC, committed by Al Viro on 23 December 2016, 04:00:22 UTC
Problem similar to ones dealt with in "fold checks into iterate_and_advance()"
and followups, except that in this case we really want to do nothing when
asked for zero-length operation - unlike zero-length iterate_and_advance(),
zero-length iterate_all_kinds() has no side effects, and callers are simpler
that way.

That got exposed when copy_from_iter_full() had been used by tipc, which
builds an msghdr with zero payload and (now) feeds it to a primitive
based on iterate_all_kinds() instead of iterate_and_advance().

Reported-by: Jon Maloy <jon.maloy@ericsson.com>
Tested-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent c00d2c7
Raw File
gfs2.h
/*
 * Copyright (C) Sistina Software, Inc.  1997-2003 All rights reserved.
 * Copyright (C) 2004-2006 Red Hat, Inc.  All rights reserved.
 *
 * This copyrighted material is made available to anyone wishing to use,
 * modify, copy, or redistribute it subject to the terms and conditions
 * of the GNU General Public License version 2.
 */

#ifndef __GFS2_DOT_H__
#define __GFS2_DOT_H__

enum {
	NO_CREATE = 0,
	CREATE = 1,
};

enum {
	NO_FORCE = 0,
	FORCE = 1,
};

#define GFS2_FAST_NAME_SIZE 8

#endif /* __GFS2_DOT_H__ */

back to top