From: Amit Pundir Date: Mon, 15 May 2017 21:27:35 +0000 (+0000) Subject: fs: ecryptfs: readdir: constify actor X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bb4973a34d9ef80d9dfa8ce850c97fa97ad66033;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git fs: ecryptfs: readdir: constify actor actor is a constant in dir_context struct and because of that we run into following build failure: ---------- fs/ecryptfs/file.c: In function ‘ecryptfs_readdir’: fs/ecryptfs/file.c:130:2: error: assignment of read-only member ‘actor’ make[2]: *** [fs/ecryptfs/file.o] Error 1 make[1]: *** [fs/ecryptfs] Error 2 make: *** [fs] Error 2 ---------- This fix is based on commit: b2497fc([readdir] constify ->actor) Signed-off-by: Amit Pundir --- diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index d61d0b1362f..0d6dc94be36 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c @@ -150,8 +150,6 @@ static int ecryptfs_readdir(struct file *file, void *dirent, filldir_t filldir) lower_file = ecryptfs_file_to_lower(file); lower_file->f_pos = file->f_pos; inode = file_inode(file); - memset(&buf, 0, sizeof(buf)); - rc = iterate_dir(lower_file, &buf.ctx); file->f_pos = lower_file->f_pos; if (rc < 0)