Merge tag 'perf-urgent-for-mingo-20160418' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-block.git] / fs / ecryptfs / inode.c
index 121114e9a464318c1a9b97668d4348a995d9f338..224b49e71aa437ff36aa79bf111c1e536a9a625d 100644 (file)
@@ -763,10 +763,10 @@ static int truncate_upper(struct dentry *dentry, struct iattr *ia,
        } else { /* ia->ia_size < i_size_read(inode) */
                /* We're chopping off all the pages down to the page
                 * in which ia->ia_size is located. Fill in the end of
-                * that page from (ia->ia_size & ~PAGE_CACHE_MASK) to
-                * PAGE_CACHE_SIZE with zeros. */
-               size_t num_zeros = (PAGE_CACHE_SIZE
-                                   - (ia->ia_size & ~PAGE_CACHE_MASK));
+                * that page from (ia->ia_size & ~PAGE_MASK) to
+                * PAGE_SIZE with zeros. */
+               size_t num_zeros = (PAGE_SIZE
+                                   - (ia->ia_size & ~PAGE_MASK));
 
                if (!(crypt_stat->flags & ECRYPTFS_ENCRYPTED)) {
                        truncate_setsize(inode, ia->ia_size);