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:
@@ -81,7 +81,7 @@ static void dnotify_recalc_inode_mask(struct fsnotify_mark *fsn_mark)
|
||||
static int dnotify_handle_event(struct fsnotify_group *group,
|
||||
struct inode *inode,
|
||||
u32 mask, const void *data, int data_type,
|
||||
const unsigned char *file_name, u32 cookie,
|
||||
const struct qstr *file_name, u32 cookie,
|
||||
struct fsnotify_iter_info *iter_info)
|
||||
{
|
||||
struct fsnotify_mark *inode_mark = fsnotify_iter_inode_mark(iter_info);
|
||||
|
@@ -367,7 +367,7 @@ static __kernel_fsid_t fanotify_get_fsid(struct fsnotify_iter_info *iter_info)
|
||||
static int fanotify_handle_event(struct fsnotify_group *group,
|
||||
struct inode *inode,
|
||||
u32 mask, const void *data, int data_type,
|
||||
const unsigned char *file_name, u32 cookie,
|
||||
const struct qstr *file_name, u32 cookie,
|
||||
struct fsnotify_iter_info *iter_info)
|
||||
{
|
||||
int ret = 0;
|
||||
|
@@ -179,10 +179,10 @@ int __fsnotify_parent(const struct path *path, struct dentry *dentry, __u32 mask
|
||||
take_dentry_name_snapshot(&name, dentry);
|
||||
if (path)
|
||||
ret = fsnotify(p_inode, mask, path, FSNOTIFY_EVENT_PATH,
|
||||
name.name, 0);
|
||||
&name.name, 0);
|
||||
else
|
||||
ret = fsnotify(p_inode, mask, dentry->d_inode, FSNOTIFY_EVENT_INODE,
|
||||
name.name, 0);
|
||||
&name.name, 0);
|
||||
release_dentry_name_snapshot(&name);
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ EXPORT_SYMBOL_GPL(__fsnotify_parent);
|
||||
static int send_to_group(struct inode *to_tell,
|
||||
__u32 mask, const void *data,
|
||||
int data_is, u32 cookie,
|
||||
const unsigned char *file_name,
|
||||
const struct qstr *file_name,
|
||||
struct fsnotify_iter_info *iter_info)
|
||||
{
|
||||
struct fsnotify_group *group = NULL;
|
||||
@@ -325,7 +325,7 @@ static void fsnotify_iter_next(struct fsnotify_iter_info *iter_info)
|
||||
* notification event in whatever means they feel necessary.
|
||||
*/
|
||||
int fsnotify(struct inode *to_tell, __u32 mask, const void *data, int data_is,
|
||||
const unsigned char *file_name, u32 cookie)
|
||||
const struct qstr *file_name, u32 cookie)
|
||||
{
|
||||
struct fsnotify_iter_info iter_info = {};
|
||||
struct super_block *sb = to_tell->i_sb;
|
||||
|
@@ -27,7 +27,7 @@ extern void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark,
|
||||
extern int inotify_handle_event(struct fsnotify_group *group,
|
||||
struct inode *inode,
|
||||
u32 mask, const void *data, int data_type,
|
||||
const unsigned char *file_name, u32 cookie,
|
||||
const struct qstr *file_name, u32 cookie,
|
||||
struct fsnotify_iter_info *iter_info);
|
||||
|
||||
extern const struct fsnotify_ops inotify_fsnotify_ops;
|
||||
|
@@ -67,7 +67,7 @@ static int inotify_merge(struct list_head *list,
|
||||
int inotify_handle_event(struct fsnotify_group *group,
|
||||
struct inode *inode,
|
||||
u32 mask, const void *data, int data_type,
|
||||
const unsigned char *file_name, u32 cookie,
|
||||
const struct qstr *file_name, u32 cookie,
|
||||
struct fsnotify_iter_info *iter_info)
|
||||
{
|
||||
struct fsnotify_mark *inode_mark = fsnotify_iter_inode_mark(iter_info);
|
||||
@@ -89,7 +89,7 @@ int inotify_handle_event(struct fsnotify_group *group,
|
||||
return 0;
|
||||
}
|
||||
if (file_name) {
|
||||
len = strlen(file_name);
|
||||
len = file_name->len;
|
||||
alloc_len += len + 1;
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ int inotify_handle_event(struct fsnotify_group *group,
|
||||
event->sync_cookie = cookie;
|
||||
event->name_len = len;
|
||||
if (len)
|
||||
strcpy(event->name, file_name);
|
||||
strcpy(event->name, file_name->name);
|
||||
|
||||
ret = fsnotify_add_event(group, fsn_event, inotify_merge);
|
||||
if (ret) {
|
||||
|
Reference in New Issue
Block a user