On Tue, Jun 01, 2010 at 01:28:50PM +0300, Boaz Harrosh wrote: > + if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || > + S_ISLNK(inode->i_mode))) > + return -EINVAL; > if (exofs_inode_is_fast_symlink(inode)) > - return; > + return -EINVAL; do_sys_truncate already makes sure ATTR_SIZE changes only happen on ISREG files. > if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) > - return; Same for these - IS_APPEND directly and IS_IMMUTABLE via inode_permission(). > + oldsize = inode->i_size; > + i_size_write(inode, newsize); > + truncate_pagecache(inode, oldsize, newsize); At this point you can probably just inline this in exofs_setattr. Especially as the lines above will be replaced with a single function call in my next batch. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html