Prev: patch usb-gadget-langwell_udc.c-printk-needs-a-unsigned-long-long-cast-for-a-dma_t.patch added to gregkh-2.6 tree
Next: (none)
From: Jiri Slaby on 16 Jun 2010 18:00 Fix a bug introduced by commit "check ATTR_SIZE contraints in inode_change_ok" which added a size check, but checks the size even if ATTR_SIZE is not in attr->ia_valid because it tests the bit in attr->ia_mode. Test properly against ia_valid. Signed-off-by: Jiri Slaby <jslaby(a)suse.cz> Cc: Christoph Hellwig <hch(a)lst.de> Cc: Al Viro <viro(a)zeniv.linux.org.uk> --- fs/attr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/attr.c b/fs/attr.c index 6959666..7ca4181 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -34,7 +34,7 @@ int inode_change_ok(const struct inode *inode, struct iattr *attr) * First check size constraints. These can't be overriden using * ATTR_FORCE. */ - if (attr->ia_mode & ATTR_SIZE) { + if (ia_valid & ATTR_SIZE) { int error = inode_newsize_ok(inode, attr->ia_size); if (error) return error; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |