aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.h
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2014-10-12 19:22:45 -0400
committerDave Chinner <david@fromorbit.com>2014-10-12 19:22:45 -0400
commit6889e783cd68b79f8330ad4d10a2571c67c3f7df (patch)
tree6ebb3900542a9d449e9c5d9b5191f35845f40130 /fs/xfs/xfs_inode.h
parent75e58ce4c8f354f1a68a8bb8a9692827cdaf3d21 (diff)
parenta8b1ee8bafc765ebf029d03c5479a69aebff9693 (diff)
Merge branch 'xfs-misc-fixes-for-3.18-3' into for-next
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r--fs/xfs/xfs_inode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index c10e3fadd9af..9af2882e1f4c 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -102,7 +102,7 @@ xfs_new_eof(struct xfs_inode *ip, xfs_fsize_t new_size)
102{ 102{
103 xfs_fsize_t i_size = i_size_read(VFS_I(ip)); 103 xfs_fsize_t i_size = i_size_read(VFS_I(ip));
104 104
105 if (new_size > i_size) 105 if (new_size > i_size || new_size < 0)
106 new_size = i_size; 106 new_size = i_size;
107 return new_size > ip->i_d.di_size ? new_size : 0; 107 return new_size > ip->i_d.di_size ? new_size : 0;
108} 108}