[PATCH] Sane return value for ecryptfs_commit_write()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Calling functions expect the return value from ecryptfs_commit_write()
to be 0 on success.

Signed-off-by: Michael Halcrow <[email protected]>

---

 fs/ecryptfs/mmap.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

9c56c9f6f49840860068b461c1d956391cbc5550
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index 65e7331..8a4040d 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -628,7 +628,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;
@@ -671,7 +670,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)) {
-- 
1.3.3

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux