aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysv/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-04-02 09:42:50 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2019-04-09 19:21:06 -0400
commit1d8b29fdb7ef39bd76bcd7a7f516938163097b0e (patch)
tree6529627ac8c398afd4d447e7259c0ecc589df138 /fs/sysv/namei.c
parent357ab5b5d240a284b261a62451e838dd9f76e6b9 (diff)
sysv: bury the broken "quietly truncate the long filenames" logics
It's contrary to the normal semantics, only sysv and adfs try to do that (on any other filesystem you'll get -ENAMETOOLONG instead of quiet truncation) and nobody actually uses that - it got accidentally broken 5 years ago and nobody noticed. Time to bury it... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/sysv/namei.c')
-rw-r--r--fs/sysv/namei.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/fs/sysv/namei.c b/fs/sysv/namei.c
index 4d5d20491ffd..ea2414b385ec 100644
--- a/fs/sysv/namei.c
+++ b/fs/sysv/namei.c
@@ -28,21 +28,6 @@ static int add_nondir(struct dentry *dentry, struct inode *inode)
28 return err; 28 return err;
29} 29}
30 30
31static int sysv_hash(const struct dentry *dentry, struct qstr *qstr)
32{
33 /* Truncate the name in place, avoids having to define a compare
34 function. */
35 if (qstr->len > SYSV_NAMELEN) {
36 qstr->len = SYSV_NAMELEN;
37 qstr->hash = full_name_hash(dentry, qstr->name, qstr->len);
38 }
39 return 0;
40}
41
42const struct dentry_operations sysv_dentry_operations = {
43 .d_hash = sysv_hash,
44};
45
46static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, unsigned int flags) 31static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, unsigned int flags)
47{ 32{
48 struct inode * inode = NULL; 33 struct inode * inode = NULL;