git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
fs
/
hfs
/
dir.c
diff --git
a/fs/hfs/dir.c
b/fs/hfs/dir.c
index
c559982
..
7cd8cc0
100644
(file)
--- a/
fs/hfs/dir.c
+++ b/
fs/hfs/dir.c
@@
-28,7
+28,7
@@
static struct dentry *hfs_lookup(struct inode *dir, struct dentry *dentry,
dentry->d_op = &hfs_dentry_operations;
hfs_find_init(HFS_SB(dir->i_sb)->cat_tree, &fd);
dentry->d_op = &hfs_dentry_operations;
hfs_find_init(HFS_SB(dir->i_sb)->cat_tree, &fd);
- hfs_cat_build_key(fd.search_key, dir->i_ino, &dentry->d_name);
+ hfs_cat_build_key(
dir->i_sb,
fd.search_key, dir->i_ino, &dentry->d_name);
res = hfs_brec_read(&fd, &rec, sizeof(rec));
if (res) {
hfs_find_exit(&fd);
res = hfs_brec_read(&fd, &rec, sizeof(rec));
if (res) {
hfs_find_exit(&fd);
@@
-56,7
+56,7
@@
static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
struct inode *inode = filp->f_dentry->d_inode;
struct super_block *sb = inode->i_sb;
int len, err;
struct inode *inode = filp->f_dentry->d_inode;
struct super_block *sb = inode->i_sb;
int len, err;
- char strbuf[HFS_
NAMELEN + 1
];
+ char strbuf[HFS_
MAX_NAMELEN
];
union hfs_cat_rec entry;
struct hfs_find_data fd;
struct hfs_readdir_data *rd;
union hfs_cat_rec entry;
struct hfs_find_data fd;
struct hfs_readdir_data *rd;
@@
-66,7
+66,7
@@
static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
return 0;
hfs_find_init(HFS_SB(sb)->cat_tree, &fd);
return 0;
hfs_find_init(HFS_SB(sb)->cat_tree, &fd);
- hfs_cat_build_key(fd.search_key, inode->i_ino, NULL);
+ hfs_cat_build_key(
sb,
fd.search_key, inode->i_ino, NULL);
err = hfs_brec_find(&fd);
if (err)
goto out;
err = hfs_brec_find(&fd);
if (err)
goto out;
@@
-81,12
+81,12
@@
static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
case 1:
hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, fd.entrylength);
if (entry.type != HFS_CDR_THD) {
case 1:
hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, fd.entrylength);
if (entry.type != HFS_CDR_THD) {
- printk(
"HFS
: bad catalog folder thread\n");
+ printk(
KERN_ERR "hfs
: bad catalog folder thread\n");
err = -EIO;
goto out;
}
//if (fd.entrylength < HFS_MIN_THREAD_SZ) {
err = -EIO;
goto out;
}
//if (fd.entrylength < HFS_MIN_THREAD_SZ) {
- // printk(
"HFS
: truncated catalog thread\n");
+ // printk(
KERN_ERR "hfs
: truncated catalog thread\n");
// err = -EIO;
// goto out;
//}
// err = -EIO;
// goto out;
//}
@@
-105,16
+105,16
@@
static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
for (;;) {
if (be32_to_cpu(fd.key->cat.ParID) != inode->i_ino) {
for (;;) {
if (be32_to_cpu(fd.key->cat.ParID) != inode->i_ino) {
- printk(
"HFS
: walked past end of dir\n");
+ printk(
KERN_ERR "hfs
: walked past end of dir\n");
err = -EIO;
goto out;
}
hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, fd.entrylength);
type = entry.type;
err = -EIO;
goto out;
}
hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, fd.entrylength);
type = entry.type;
- len = hfs_mac2
triv(
strbuf, &fd.key->cat.CName);
+ len = hfs_mac2
asc(sb,
strbuf, &fd.key->cat.CName);
if (type == HFS_CDR_DIR) {
if (fd.entrylength < sizeof(struct hfs_cat_dir)) {
if (type == HFS_CDR_DIR) {
if (fd.entrylength < sizeof(struct hfs_cat_dir)) {
- printk(
"HFS
: small dir entry\n");
+ printk(
KERN_ERR "hfs
: small dir entry\n");
err = -EIO;
goto out;
}
err = -EIO;
goto out;
}
@@
-123,7
+123,7
@@
static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
break;
} else if (type == HFS_CDR_FIL) {
if (fd.entrylength < sizeof(struct hfs_cat_file)) {
break;
} else if (type == HFS_CDR_FIL) {
if (fd.entrylength < sizeof(struct hfs_cat_file)) {
- printk(
"HFS
: small file entry\n");
+ printk(
KERN_ERR "hfs
: small file entry\n");
err = -EIO;
goto out;
}
err = -EIO;
goto out;
}
@@
-131,7
+131,7
@@
static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
be32_to_cpu(entry.file.FlNum), DT_REG))
break;
} else {
be32_to_cpu(entry.file.FlNum), DT_REG))
break;
} else {
- printk(
"HFS
: bad catalog entry type %d\n", type);
+ printk(
KERN_ERR "hfs
: bad catalog entry type %d\n", type);
err = -EIO;
goto out;
}
err = -EIO;
goto out;
}
@@
-307,12
+307,13
@@
static int hfs_rename(struct inode *old_dir, struct dentry *old_dentry,
old_dir, &old_dentry->d_name,
new_dir, &new_dentry->d_name);
if (!res)
old_dir, &old_dentry->d_name,
new_dir, &new_dentry->d_name);
if (!res)
- hfs_cat_build_key((btree_key *)&HFS_I(old_dentry->d_inode)->cat_key,
+ hfs_cat_build_key(old_dir->i_sb,
+ (btree_key *)&HFS_I(old_dentry->d_inode)->cat_key,
new_dir->i_ino, &new_dentry->d_name);
return res;
}
new_dir->i_ino, &new_dentry->d_name);
return res;
}
-struct file_operations hfs_dir_operations = {
+
const
struct file_operations hfs_dir_operations = {
.read = generic_read_dir,
.readdir = hfs_readdir,
.llseek = generic_file_llseek,
.read = generic_read_dir,
.readdir = hfs_readdir,
.llseek = generic_file_llseek,