fs: ecryptfs: readdir: constify actor
authorAmit Pundir <amit.pundir@linaro.org>
Mon, 15 May 2017 21:27:35 +0000 (21:27 +0000)
committerStricted <info@stricted.net>
Thu, 11 Oct 2018 16:03:59 +0000 (18:03 +0200)
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 <amit.pundir@linaro.org>
fs/ecryptfs/file.c

index d61d0b1362f90a37570f58c3c6104a8c95fddf3c..0d6dc94be36a725c33927ef9f766acdac3771b59 100644 (file)
@@ -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)