Re: [PATCH] cifs: call pagecache_isize_extended() in cifs_setsize() when extending
Paulo Alcantara <[email protected]>
| Newsgroups | org.kernel.vger.stable,org.kernel.vger.linux-cifs |
|---|---|
| Message-ID | <[email protected]> |
Frank Sorenson <[email protected]> writes: > cifs_setsize() calls truncate_pagecache() but skips > pagecache_isize_extended() on extension. truncate_setsize() shows > the correct pattern: > > i_size_write(inode, newsize); > if (newsize > oldsize) > pagecache_isize_extended(inode, oldsize, newsize); > truncate_pagecache(inode, newsize); > > pagecache_isize_extended() zeroes the tail of the page straddling old > EOF. Without it, dirty bytes in that region can be written back to > the server, exposing stale data in the newly extended range. > ... Applied.