From: Michael Halcrow Calling functions expect the return value from ecryptfs_commit_write() to be 0 on success. Signed-off-by: Michael Halcrow Signed-off-by: Andrew Morton --- fs/ecryptfs/mmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -puN fs/ecryptfs/mmap.c~ecryptfs-mmap-operations-fix fs/ecryptfs/mmap.c --- a/fs/ecryptfs/mmap.c~ecryptfs-mmap-operations-fix +++ a/fs/ecryptfs/mmap.c @@ -633,7 +633,6 @@ static int ecryptfs_commit_write(struct { struct ecryptfs_page_crypt_context ctx; loff_t pos; - unsigned bytes = to - from; struct inode *inode; struct inode *lower_inode; struct file *lower_file; @@ -678,7 +677,7 @@ static int ecryptfs_commit_write(struct "index [0x%.16x])\n", page->index); goto out; } - rc = bytes; + rc = 0; inode->i_blocks = lower_inode->i_blocks; pos = (page->index << PAGE_CACHE_SHIFT) + to; if (pos > i_size_read(inode)) { _