X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=fs%2Fattr.c;h=1552a5f23d6b3588730ee432a2078443a5ce0db6;hb=1da8cf961bb13f4c3ea11373696b5ac986a47cde;hp=b5b8835ddf1535784c74c048ec8dc43932f15212;hpb=8db4a0291b09be667ba72584e1aeb7aaf8b497bd;p=linux-2.6-microblaze.git diff --git a/fs/attr.c b/fs/attr.c index b5b8835ddf15..1552a5f23d6b 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -183,6 +183,8 @@ EXPORT_SYMBOL(setattr_prepare); */ int inode_newsize_ok(const struct inode *inode, loff_t offset) { + if (offset < 0) + return -EINVAL; if (inode->i_size < offset) { unsigned long limit;