xfs: check resblks before calling xfs_dir_canenter
authorEric Sandeen <sandeen@sandeen.net>
Tue, 9 Sep 2014 01:57:52 +0000 (11:57 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 9 Sep 2014 01:57:52 +0000 (11:57 +1000)
Move the resblks test out of the xfs_dir_canenter,
and into the caller.

This makes a little more sense on the face of it;
xfs_dir_canenter immediately returns if resblks !=0;
and given some of the comments preceding the calls:

 * Check for ability to enter directory entry, if no space reserved.

even more so.

It also facilitates the next patch.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_dir2.c
fs/xfs/libxfs/xfs_dir2.h
fs/xfs/xfs_inode.c
fs/xfs/xfs_symlink.c

Simple merge
Simple merge
Simple merge
Simple merge