summaryrefslogtreecommitdiffstats
path: root/fs/crypto
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-01-19 13:45:24 -0800
committerTheodore Ts'o <tytso@mit.edu>2018-02-01 10:51:18 -0500
commit0b1dfa4cc6c60052b2c30ead316fa84c46d3c43c (patch)
treec0683adb0d9cc50553ff712c1f2d10e9f61407e5 /fs/crypto
parent3d204e24d452f96704f5feb83f6b7654245defc9 (diff)
downloadlinux-0b1dfa4cc6c60052b2c30ead316fa84c46d3c43c.tar.gz
linux-0b1dfa4cc6c60052b2c30ead316fa84c46d3c43c.tar.bz2
linux-0b1dfa4cc6c60052b2c30ead316fa84c46d3c43c.zip
fscrypt: fix build with pre-4.6 gcc versions
gcc versions prior to 4.6 require an extra level of braces when using a designated initializer for a member in an anonymous struct or union. This caused a compile error with the 'struct qstr' initialization in __fscrypt_encrypt_symlink(). Fix it by using QSTR_INIT(). Reported-by: Andrew Morton <akpm@linux-foundation.org> Fixes: 76e81d6d5048 ("fscrypt: new helper functions for ->symlink()") Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/crypto')
-rw-r--r--fs/crypto/hooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/crypto/hooks.c b/fs/crypto/hooks.c
index 28f9f059571d..bec06490fb13 100644
--- a/fs/crypto/hooks.c
+++ b/fs/crypto/hooks.c
@@ -158,7 +158,7 @@ int __fscrypt_encrypt_symlink(struct inode *inode, const char *target,
unsigned int len, struct fscrypt_str *disk_link)
{
int err;
- struct qstr iname = { .name = target, .len = len };
+ struct qstr iname = QSTR_INIT(target, len);
struct fscrypt_symlink_data *sd;
unsigned int ciphertext_len;