From: Michael Halcrow On Wed, Sep 19, 2007 at 10:50:57PM -0700, Andrew Morton wrote: > On Mon, 17 Sep 2007 16:50:16 -0500 Michael Halcrow wrote: > > +ecryptfs_copy_up_encrypted_with_header(struct page *page, > > + struct ecryptfs_crypt_stat *crypt_stat) > > +{ ... > > + flush_dcache_page(page); > > + if (rc) { > > + ClearPageUptodate(page); > > + printk(KERN_ERR "%s: Error reading xattr " > > + "region; rc = [%d]\n", __FUNCTION__, rc); > > + goto out; > > + } > > + SetPageUptodate(page); > > I don't know what sort of page `page' refers to here, but normally we only > manipulate the page uptodate status under lock_page(). This is the page that eCryptfs gets via ecryptfs_aops->ecryptfs_readpage(), so this should be okay. The comment should make the fact that the page is locked explicit. Signed-off-by: Michael Halcrow Signed-off-by: Andrew Morton --- fs/ecryptfs/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/ecryptfs/mmap.c~ecryptfs-convert-mmap-functions-to-use-persistent-file-fix fs/ecryptfs/mmap.c --- a/fs/ecryptfs/mmap.c~ecryptfs-convert-mmap-functions-to-use-persistent-file-fix +++ a/fs/ecryptfs/mmap.c @@ -270,7 +270,7 @@ static void set_header_info(char *page_v * ecryptfs_copy_up_encrypted_with_header * @page: Sort of a ``virtual'' representation of the encrypted lower * file. The actual lower file does not have the metadata in - * the header. + * the header. This is locked. * @crypt_stat: The eCryptfs inode's cryptographic context * * The ``view'' is the version of the file that userspace winds up _