mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
Merge branch 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc dcache updates from Al Viro: "Most of this pile is putting name length into struct name_snapshot and making use of it. The beginning of this series ("ovl_lookup_real_one(): don't bother with strlen()") ought to have been split in two (separate switch of name_snapshot to struct qstr from overlayfs reaping the trivial benefits of that), but I wanted to avoid a rebase - by the time I'd spotted that it was (a) in -next and (b) close to 5.1-final ;-/" * 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: audit_compare_dname_path(): switch to const struct qstr * audit_update_watch(): switch to const struct qstr * inotify_handle_event(): don't bother with strlen() fsnotify: switch send_to_group() and ->handle_event to const struct qstr * fsnotify(): switch to passing const struct qstr * for file_name switch fsnotify_move() to passing const struct qstr * for old_name ovl_lookup_real_one(): don't bother with strlen() sysv: bury the broken "quietly truncate the long filenames" logics nsfs: unobfuscate unexport d_alloc_pseudo()
This commit is contained in:
@@ -1292,12 +1292,12 @@ int parent_len(const char *path)
|
||||
* @parentlen: length of the parent if known. Passing in AUDIT_NAME_FULL
|
||||
* here indicates that we must compute this value.
|
||||
*/
|
||||
int audit_compare_dname_path(const char *dname, const char *path, int parentlen)
|
||||
int audit_compare_dname_path(const struct qstr *dname, const char *path, int parentlen)
|
||||
{
|
||||
int dlen, pathlen;
|
||||
const char *p;
|
||||
|
||||
dlen = strlen(dname);
|
||||
dlen = dname->len;
|
||||
pathlen = strlen(path);
|
||||
if (pathlen < dlen)
|
||||
return 1;
|
||||
@@ -1308,7 +1308,7 @@ int audit_compare_dname_path(const char *dname, const char *path, int parentlen)
|
||||
|
||||
p = path + parentlen;
|
||||
|
||||
return strncmp(p, dname, dlen);
|
||||
return strncmp(p, dname->name, dlen);
|
||||
}
|
||||
|
||||
int audit_filter(int msgtype, unsigned int listtype)
|
||||
|
Reference in New Issue
Block a user