diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-04 11:15:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-04 11:15:33 -0500 |
commit | 0f2cc4ecd81dc1917a041dc93db0ada28f8356fa (patch) | |
tree | f128b50f48f50f0cda6d2b20b53e9ad6e2dfded3 /fs/hpfs/dir.c | |
parent | 1fae4cfb97302289bb5df6a8195eb28385d0b002 (diff) | |
parent | 9643f5d94aadd47a5fa9754fb60f2c957de05903 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (52 commits)
init: Open /dev/console from rootfs
mqueue: fix typo "failues" -> "failures"
mqueue: only set error codes if they are really necessary
mqueue: simplify do_open() error handling
mqueue: apply mathematics distributivity on mq_bytes calculation
mqueue: remove unneeded info->messages initialization
mqueue: fix mq_open() file descriptor leak on user-space processes
fix race in d_splice_alias()
set S_DEAD on unlink() and non-directory rename() victims
vfs: add NOFOLLOW flag to umount(2)
get rid of ->mnt_parent in tomoyo/realpath
hppfs can use existing proc_mnt, no need for do_kern_mount() in there
Mirror MS_KERNMOUNT in ->mnt_flags
get rid of useless vfsmount_lock use in put_mnt_ns()
Take vfsmount_lock to fs/internal.h
get rid of insanity with namespace roots in tomoyo
take check for new events in namespace (guts of mounts_poll()) to namespace.c
Don't mess with generic_permission() under ->d_lock in hpfs
sanitize const/signedness for udf
nilfs: sanitize const/signedness in dealing with ->d_name.name
...
Fix up fairly trivial (famous last words...) conflicts in
drivers/infiniband/core/uverbs_main.c and security/tomoyo/realpath.c
Diffstat (limited to 'fs/hpfs/dir.c')
-rw-r--r-- | fs/hpfs/dir.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/hpfs/dir.c b/fs/hpfs/dir.c index 8865c94f55f6..26e3964a4b8c 100644 --- a/fs/hpfs/dir.c +++ b/fs/hpfs/dir.c | |||
@@ -59,7 +59,7 @@ static int hpfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
59 | struct hpfs_dirent *de; | 59 | struct hpfs_dirent *de; |
60 | int lc; | 60 | int lc; |
61 | long old_pos; | 61 | long old_pos; |
62 | char *tempname; | 62 | unsigned char *tempname; |
63 | int c1, c2 = 0; | 63 | int c1, c2 = 0; |
64 | int ret = 0; | 64 | int ret = 0; |
65 | 65 | ||
@@ -158,11 +158,11 @@ static int hpfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
158 | tempname = hpfs_translate_name(inode->i_sb, de->name, de->namelen, lc, de->not_8x3); | 158 | tempname = hpfs_translate_name(inode->i_sb, de->name, de->namelen, lc, de->not_8x3); |
159 | if (filldir(dirent, tempname, de->namelen, old_pos, de->fnode, DT_UNKNOWN) < 0) { | 159 | if (filldir(dirent, tempname, de->namelen, old_pos, de->fnode, DT_UNKNOWN) < 0) { |
160 | filp->f_pos = old_pos; | 160 | filp->f_pos = old_pos; |
161 | if (tempname != (char *)de->name) kfree(tempname); | 161 | if (tempname != de->name) kfree(tempname); |
162 | hpfs_brelse4(&qbh); | 162 | hpfs_brelse4(&qbh); |
163 | goto out; | 163 | goto out; |
164 | } | 164 | } |
165 | if (tempname != (char *)de->name) kfree(tempname); | 165 | if (tempname != de->name) kfree(tempname); |
166 | hpfs_brelse4(&qbh); | 166 | hpfs_brelse4(&qbh); |
167 | } | 167 | } |
168 | out: | 168 | out: |
@@ -187,7 +187,7 @@ out: | |||
187 | 187 | ||
188 | struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) | 188 | struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) |
189 | { | 189 | { |
190 | const char *name = dentry->d_name.name; | 190 | const unsigned char *name = dentry->d_name.name; |
191 | unsigned len = dentry->d_name.len; | 191 | unsigned len = dentry->d_name.len; |
192 | struct quad_buffer_head qbh; | 192 | struct quad_buffer_head qbh; |
193 | struct hpfs_dirent *de; | 193 | struct hpfs_dirent *de; |
@@ -197,7 +197,7 @@ struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry, struct name | |||
197 | struct hpfs_inode_info *hpfs_result; | 197 | struct hpfs_inode_info *hpfs_result; |
198 | 198 | ||
199 | lock_kernel(); | 199 | lock_kernel(); |
200 | if ((err = hpfs_chk_name((char *)name, &len))) { | 200 | if ((err = hpfs_chk_name(name, &len))) { |
201 | if (err == -ENAMETOOLONG) { | 201 | if (err == -ENAMETOOLONG) { |
202 | unlock_kernel(); | 202 | unlock_kernel(); |
203 | return ERR_PTR(-ENAMETOOLONG); | 203 | return ERR_PTR(-ENAMETOOLONG); |
@@ -209,7 +209,7 @@ struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry, struct name | |||
209 | * '.' and '..' will never be passed here. | 209 | * '.' and '..' will never be passed here. |
210 | */ | 210 | */ |
211 | 211 | ||
212 | de = map_dirent(dir, hpfs_i(dir)->i_dno, (char *) name, len, NULL, &qbh); | 212 | de = map_dirent(dir, hpfs_i(dir)->i_dno, name, len, NULL, &qbh); |
213 | 213 | ||
214 | /* | 214 | /* |
215 | * This is not really a bailout, just means file not found. | 215 | * This is not really a bailout, just means file not found. |
@@ -250,7 +250,7 @@ struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry, struct name | |||
250 | hpfs_result = hpfs_i(result); | 250 | hpfs_result = hpfs_i(result); |
251 | if (!de->directory) hpfs_result->i_parent_dir = dir->i_ino; | 251 | if (!de->directory) hpfs_result->i_parent_dir = dir->i_ino; |
252 | 252 | ||
253 | hpfs_decide_conv(result, (char *)name, len); | 253 | hpfs_decide_conv(result, name, len); |
254 | 254 | ||
255 | if (de->has_acl || de->has_xtd_perm) if (!(dir->i_sb->s_flags & MS_RDONLY)) { | 255 | if (de->has_acl || de->has_xtd_perm) if (!(dir->i_sb->s_flags & MS_RDONLY)) { |
256 | hpfs_error(result->i_sb, "ACLs or XPERM found. This is probably HPFS386. This driver doesn't support it now. Send me some info on these structures"); | 256 | hpfs_error(result->i_sb, "ACLs or XPERM found. This is probably HPFS386. This driver doesn't support it now. Send me some info on these structures"); |