xfs: project id inheritance is a directory only flag
authorDave Chinner <dchinner@redhat.com>
Wed, 1 Oct 2014 23:18:40 +0000 (09:18 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 1 Oct 2014 23:18:40 +0000 (09:18 +1000)
commit9336e3a765b68d4a7fdd8256f393ebce95ecb0a7
treec80f6c580eade5ae8876ca3740fc62608aaa82f0
parente076b0f3a5c472e77c0a0e163188f2761e8b4fed
xfs: project id inheritance is a directory only flag

xfs_set_diflags() allows it to be set on non-directory inodes, and
this flags errors in xfs_repair. Further, inode allocation allows
the same directory-only flag to be inherited to non-directories.
Make sure directory inode flags don't appear on other types of
inodes.

This fixes several xfstests scratch fileystem corruption reports
(e.g. xfs/050) now that xfstests checks scratch filesystems after
test completion.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_inode.c
fs/xfs/xfs_ioctl.c