| .. | .. |
|---|
| 28 | 28 | return err; |
|---|
| 29 | 29 | } |
|---|
| 30 | 30 | |
|---|
| 31 | | -static 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 | | - |
|---|
| 42 | | -const struct dentry_operations sysv_dentry_operations = { |
|---|
| 43 | | - .d_hash = sysv_hash, |
|---|
| 44 | | -}; |
|---|
| 45 | | - |
|---|
| 46 | 31 | static struct dentry *sysv_lookup(struct inode * dir, struct dentry * dentry, unsigned int flags) |
|---|
| 47 | 32 | { |
|---|
| 48 | 33 | struct inode * inode = NULL; |
|---|