Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207692
b: refs/heads/master
c: 59b0df2
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris committed Jul 28, 2010
1 parent 3b2c3d8 commit fd634a8
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 43ed7e16a8b47059d7f6ff67ba76f383a2421de3
refs/heads/master: 59b0df211bd9699d7e0d01fcf9345a149f75b033
2 changes: 1 addition & 1 deletion trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2635,7 +2635,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
{
int error;
int is_dir = S_ISDIR(old_dentry->d_inode->i_mode);
const char *old_name;
const unsigned char *old_name;

if (old_dentry->d_inode == new_dentry->d_inode)
return 0;
Expand Down
5 changes: 3 additions & 2 deletions trunk/fs/notify/fsnotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void __fsnotify_flush_ignored_mask(struct inode *inode, void *data, int data_is)

static void send_to_group(struct fsnotify_group *group, struct inode *to_tell,
struct vfsmount *mnt, __u32 mask, void *data,
int data_is, u32 cookie, const char *file_name,
int data_is, u32 cookie, const unsigned char *file_name,
struct fsnotify_event **event)
{
if (!group->ops->should_send_event(group, to_tell, mnt, mask,
Expand Down Expand Up @@ -206,7 +206,8 @@ static bool needed_by_vfsmount(__u32 test_mask, struct vfsmount *mnt)
* out to all of the registered fsnotify_group. Those groups can then use the
* notification event in whatever means they feel necessary.
*/
void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, const char *file_name, u32 cookie)
void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
const unsigned char *file_name, u32 cookie)
{
struct fsnotify_group *group;
struct fsnotify_event *event = NULL;
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/notify/notification.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ struct fsnotify_event *fsnotify_clone_event(struct fsnotify_event *old_event)
* @name the filename, if available
*/
struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask, void *data,
int data_type, const char *name, u32 cookie,
gfp_t gfp)
int data_type, const unsigned char *name,
u32 cookie, gfp_t gfp)
{
struct fsnotify_event *event;

Expand Down
12 changes: 6 additions & 6 deletions trunk/include/linux/fsnotify.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ static inline void fsnotify_link_count(struct inode *inode)
* fsnotify_move - file old_name at old_dir was moved to new_name at new_dir
*/
static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
const char *old_name,
const unsigned char *old_name,
int isdir, struct inode *target, struct dentry *moved)
{
struct inode *source = moved->d_inode;
u32 fs_cookie = fsnotify_get_cookie();
__u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM);
__u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO);
const char *new_name = moved->d_name.name;
const unsigned char *new_name = moved->d_name.name;

if (old_dir == new_dir)
old_dir_mask |= FS_DN_RENAME;
Expand Down Expand Up @@ -290,27 +290,27 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid)
/*
* fsnotify_oldname_init - save off the old filename before we change it
*/
static inline const char *fsnotify_oldname_init(const char *name)
static inline const unsigned char *fsnotify_oldname_init(const unsigned char *name)
{
return kstrdup(name, GFP_KERNEL);
}

/*
* fsnotify_oldname_free - free the name we got from fsnotify_oldname_init
*/
static inline void fsnotify_oldname_free(const char *old_name)
static inline void fsnotify_oldname_free(const unsigned char *old_name)
{
kfree(old_name);
}

#else /* CONFIG_FSNOTIFY */

static inline const char *fsnotify_oldname_init(const char *name)
static inline const char *fsnotify_oldname_init(const unsigned char *name)
{
return NULL;
}

static inline void fsnotify_oldname_free(const char *old_name)
static inline void fsnotify_oldname_free(const unsigned char *old_name)
{
}

Expand Down
9 changes: 5 additions & 4 deletions trunk/include/linux/fsnotify_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ struct fsnotify_event {
__u32 mask; /* the type of access, bitwise OR for FS_* event types */

u32 sync_cookie; /* used to corrolate events, namely inotify mv events */
char *file_name;
const unsigned char *file_name;
size_t name_len;
struct pid *tgid;

Expand Down Expand Up @@ -283,7 +283,7 @@ struct fsnotify_mark {

/* main fsnotify call to send events */
extern void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
const char *name, u32 cookie);
const unsigned char *name, u32 cookie);
extern void __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask);
extern void __fsnotify_inode_delete(struct inode *inode);
extern void __fsnotify_vfsmount_delete(struct vfsmount *mnt);
Expand Down Expand Up @@ -402,7 +402,8 @@ extern void fsnotify_unmount_inodes(struct list_head *list);

/* put here because inotify does some weird stuff when destroying watches */
extern struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask,
void *data, int data_is, const char *name,
void *data, int data_is,
const unsigned char *name,
u32 cookie, gfp_t gfp);

/* fanotify likes to change events after they are on lists... */
Expand All @@ -413,7 +414,7 @@ extern int fsnotify_replace_event(struct fsnotify_event_holder *old_holder,
#else

static inline void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
const char *name, u32 cookie)
const unsigned char *name, u32 cookie)
{}

static inline void __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)
Expand Down

0 comments on commit fd634a8

Please sign in to comment.