Thanks for reply. > .. which isn't in the pagetable, and then the kernel notices it's > outside the file and causes a SIGBUS. But if length of file after truncate is 4 byte, for example, and I do p[5]=.., this didn't cause any error, so I can append some garbage after end of file, and this is not error? > > .. and removes the page from the pagetable. > I'm sorry for stupid question, but where we remove from pagetable, I see two places in ext2_truncate: block_truncate_page and sync_mapping_buffers but sync_mapping_buffer called only if inode_needs_sync(inode), so p=mmap and reading file using p cause setting of "inode_need_sync" flag? -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/