aboutsummaryrefslogtreecommitdiffstats
path: root/fs
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 /fs
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 'fs')
-rw-r--r--fs/namei.c2
-rw-r--r--fs/notify/fsnotify.c5
-rw-r--r--fs/notify/notification.c4
3 files changed, 6 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 868d0cb9d473..3479b176a4cd 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2635,7 +2635,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
2635{ 2635{
2636 int error; 2636 int error;
2637 int is_dir = S_ISDIR(old_dentry->d_inode->i_mode); 2637 int is_dir = S_ISDIR(old_dentry->d_inode->i_mode);
2638 const char *old_name; 2638 const unsigned char *old_name;
2639 2639
2640 if (old_dentry->d_inode == new_dentry->d_inode) 2640 if (old_dentry->d_inode == new_dentry->d_inode)
2641 return 0; 2641 return 0;
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index 54d58d5f72c1..c5adf833bf6a 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -171,7 +171,7 @@ void __fsnotify_flush_ignored_mask(struct inode *inode, void *data, int data_is)
171 171
172static void send_to_group(struct fsnotify_group *group, struct inode *to_tell, 172static void send_to_group(struct fsnotify_group *group, struct inode *to_tell,
173 struct vfsmount *mnt, __u32 mask, void *data, 173 struct vfsmount *mnt, __u32 mask, void *data,
174 int data_is, u32 cookie, const char *file_name, 174 int data_is, u32 cookie, const unsigned char *file_name,
175 struct fsnotify_event **event) 175 struct fsnotify_event **event)
176{ 176{
177 if (!group->ops->should_send_event(group, to_tell, mnt, mask, 177 if (!group->ops->should_send_event(group, to_tell, mnt, mask,
@@ -206,7 +206,8 @@ static bool needed_by_vfsmount(__u32 test_mask, struct vfsmount *mnt)
206 * out to all of the registered fsnotify_group. Those groups can then use the 206 * out to all of the registered fsnotify_group. Those groups can then use the
207 * notification event in whatever means they feel necessary. 207 * notification event in whatever means they feel necessary.
208 */ 208 */
209void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, const char *file_name, u32 cookie) 209void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
210 const unsigned char *file_name, u32 cookie)
210{ 211{
211 struct fsnotify_group *group; 212 struct fsnotify_group *group;
212 struct fsnotify_event *event = NULL; 213 struct fsnotify_event *event = NULL;
diff --git a/fs/notify/notification.c b/fs/notify/notification.c
index 2d50a40ab1e4..b35faafacd38 100644
--- a/fs/notify/notification.c
+++ b/fs/notify/notification.c
@@ -370,8 +370,8 @@ struct fsnotify_event *fsnotify_clone_event(struct fsnotify_event *old_event)
370 * @name the filename, if available 370 * @name the filename, if available
371 */ 371 */
372struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask, void *data, 372struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask, void *data,
373 int data_type, const char *name, u32 cookie, 373 int data_type, const unsigned char *name,
374 gfp_t gfp) 374 u32 cookie, gfp_t gfp)
375{ 375{
376 struct fsnotify_event *event; 376 struct fsnotify_event *event;
377 377