]> git.baikalelectronics.ru Git - kernel.git/commit
fscrypt: drop max_namelen check from fname_decrypt()
authorEric Biggers <ebiggers@google.com>
Mon, 30 Apr 2018 22:51:42 +0000 (15:51 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 20 May 2018 20:21:02 +0000 (16:21 -0400)
commit1aad1aa62a68f0cfc615a9d87bd2a3bedea32a64
treecad33d798d5bbe81893afa35a995fa88eda7a6a6
parentcf8f40d35716d215276b8622e4d7cc65e0bd25a4
fscrypt: drop max_namelen check from fname_decrypt()

fname_decrypt() returns an error if the input filename is longer than
the inode's ->max_namelen() as given by the filesystem.  But, this
doesn't actually make sense because the filesystem provided the input
filename in the first place, where it was subject to the filesystem's
limits.  And fname_decrypt() has no internal limit itself.

Thus, remove this unnecessary check.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/crypto/fname.c