aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fsnotify.h
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-02-08 12:53:52 -0500
committerEric Paris <eparis@redhat.com>2010-07-28 09:59:01 -0400
commit59b0df211bd9699d7e0d01fcf9345a149f75b033 (patch)
tree0f6e8bebfa090aa5c1d91d9efc5c2b04aeeed05c /include/linux/fsnotify.h
parent43ed7e16a8b47059d7f6ff67ba76f383a2421de3 (diff)
fsnotify: use unsigned char * for dentry->d_name.name
fsnotify was using char * when it passed around the d_name.name string internally but it is actually an unsigned char *. This patch switches fsnotify to use unsigned and should silence some pointer signess warnings which have popped out of xfs. I do not add -Wpointer-sign to the fsnotify code as there are still issues with kstrdup and strlen which would pop out needless warnings. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include/linux/fsnotify.h')
-rw-r--r--include/linux/fsnotify.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
index 06c0e50c7968..b8cf161f5a6d 100644
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@ -59,14 +59,14 @@ static inline void fsnotify_link_count(struct inode *inode)
59 * fsnotify_move - file old_name at old_dir was moved to new_name at new_dir 59 * fsnotify_move - file old_name at old_dir was moved to new_name at new_dir
60 */ 60 */
61static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, 61static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
62 const char *old_name, 62 const unsigned char *old_name,
63 int isdir, struct inode *target, struct dentry *moved) 63 int isdir, struct inode *target, struct dentry *moved)
64{ 64{
65 struct inode *source = moved->d_inode; 65 struct inode *source = moved->d_inode;
66 u32 fs_cookie = fsnotify_get_cookie(); 66 u32 fs_cookie = fsnotify_get_cookie();
67 __u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM); 67 __u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM);
68 __u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO); 68 __u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO);
69 const char *new_name = moved->d_name.name; 69 const unsigned char *new_name = moved->d_name.name;
70 70
71 if (old_dir == new_dir) 71 if (old_dir == new_dir)
72 old_dir_mask |= FS_DN_RENAME; 72 old_dir_mask |= FS_DN_RENAME;
@@ -290,7 +290,7 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid)
290/* 290/*
291 * fsnotify_oldname_init - save off the old filename before we change it 291 * fsnotify_oldname_init - save off the old filename before we change it
292 */ 292 */
293static inline const char *fsnotify_oldname_init(const char *name) 293static inline const unsigned char *fsnotify_oldname_init(const unsigned char *name)
294{ 294{
295 return kstrdup(name, GFP_KERNEL); 295 return kstrdup(name, GFP_KERNEL);
296} 296}
@@ -298,19 +298,19 @@ static inline const char *fsnotify_oldname_init(const char *name)
298/* 298/*
299 * fsnotify_oldname_free - free the name we got from fsnotify_oldname_init 299 * fsnotify_oldname_free - free the name we got from fsnotify_oldname_init
300 */ 300 */
301static inline void fsnotify_oldname_free(const char *old_name) 301static inline void fsnotify_oldname_free(const unsigned char *old_name)
302{ 302{
303 kfree(old_name); 303 kfree(old_name);
304} 304}
305 305
306#else /* CONFIG_FSNOTIFY */ 306#else /* CONFIG_FSNOTIFY */
307 307
308static inline const char *fsnotify_oldname_init(const char *name) 308static inline const char *fsnotify_oldname_init(const unsigned char *name)
309{ 309{
310 return NULL; 310 return NULL;
311} 311}
312 312
313static inline void fsnotify_oldname_free(const char *old_name) 313static inline void fsnotify_oldname_free(const unsigned char *old_name)
314{ 314{
315} 315}
316 316