Commit a1f6ff21 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] large dev_t - second series (15/15)

	old_decode_dev()/old_encode_dev() added where needed in other
filesystems.  Parts in different filesystems are independent, but IMO
it's not worse splitting into a dozen of half-kilobyte patches.
parent 0dbd0f68
...@@ -71,7 +71,8 @@ static struct inode *get_cramfs_inode(struct super_block *sb, struct cramfs_inod ...@@ -71,7 +71,8 @@ static struct inode *get_cramfs_inode(struct super_block *sb, struct cramfs_inod
inode->i_data.a_ops = &cramfs_aops; inode->i_data.a_ops = &cramfs_aops;
} else { } else {
inode->i_size = 0; inode->i_size = 0;
init_special_inode(inode, inode->i_mode, cramfs_inode->size); init_special_inode(inode, inode->i_mode,
old_decode_dev(cramfs_inode->size));
} }
} }
return inode; return inode;
......
...@@ -117,7 +117,7 @@ void efs_read_inode(struct inode *inode) { ...@@ -117,7 +117,7 @@ void efs_read_inode(struct inode *inode) {
* to see whether odev contains 65535. if this is the case then we * to see whether odev contains 65535. if this is the case then we
* should then do device = be32_to_cpu(efs_inode->di_u.di_dev.ndev). * should then do device = be32_to_cpu(efs_inode->di_u.di_dev.ndev).
*/ */
device = be16_to_cpu(efs_inode->di_u.di_dev.odev); device = old_decode_dev(be16_to_cpu(efs_inode->di_u.di_dev.odev));
/* get the number of extents for this object */ /* get the number of extents for this object */
in->numextents = be16_to_cpu(efs_inode->di_numextents); in->numextents = be16_to_cpu(efs_inode->di_numextents);
......
...@@ -1127,7 +1127,7 @@ void ext2_read_inode (struct inode * inode) ...@@ -1127,7 +1127,7 @@ void ext2_read_inode (struct inode * inode)
} else { } else {
inode->i_op = &ext2_special_inode_operations; inode->i_op = &ext2_special_inode_operations;
init_special_inode(inode, inode->i_mode, init_special_inode(inode, inode->i_mode,
le32_to_cpu(raw_inode->i_block[0])); old_decode_dev(le32_to_cpu(raw_inode->i_block[0])));
} }
brelse (bh); brelse (bh);
ext2_set_inode_flags(inode); ext2_set_inode_flags(inode);
...@@ -1216,7 +1216,7 @@ static int ext2_update_inode(struct inode * inode, int do_sync) ...@@ -1216,7 +1216,7 @@ static int ext2_update_inode(struct inode * inode, int do_sync)
raw_inode->i_generation = cpu_to_le32(inode->i_generation); raw_inode->i_generation = cpu_to_le32(inode->i_generation);
if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
raw_inode->i_block[0] = cpu_to_le32(inode->i_rdev); raw_inode->i_block[0] = cpu_to_le32(old_encode_dev(inode->i_rdev));
else for (n = 0; n < EXT2_N_BLOCKS; n++) else for (n = 0; n < EXT2_N_BLOCKS; n++)
raw_inode->i_block[n] = ei->i_data[n]; raw_inode->i_block[n] = ei->i_data[n];
mark_buffer_dirty(bh); mark_buffer_dirty(bh);
......
...@@ -2566,7 +2566,7 @@ void ext3_read_inode(struct inode * inode) ...@@ -2566,7 +2566,7 @@ void ext3_read_inode(struct inode * inode)
} else { } else {
inode->i_op = &ext3_special_inode_operations; inode->i_op = &ext3_special_inode_operations;
init_special_inode(inode, inode->i_mode, init_special_inode(inode, inode->i_mode,
le32_to_cpu(raw_inode->i_block[0])); old_decode_dev(le32_to_cpu(raw_inode->i_block[0])));
} }
brelse (iloc.bh); brelse (iloc.bh);
ext3_set_inode_flags(inode); ext3_set_inode_flags(inode);
...@@ -2668,7 +2668,7 @@ static int ext3_do_update_inode(handle_t *handle, ...@@ -2668,7 +2668,7 @@ static int ext3_do_update_inode(handle_t *handle,
raw_inode->i_generation = cpu_to_le32(inode->i_generation); raw_inode->i_generation = cpu_to_le32(inode->i_generation);
if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
raw_inode->i_block[0] = raw_inode->i_block[0] =
cpu_to_le32(inode->i_rdev); cpu_to_le32(old_encode_dev(inode->i_rdev));
else for (block = 0; block < EXT3_N_BLOCKS; block++) else for (block = 0; block < EXT3_N_BLOCKS; block++)
raw_inode->i_block[block] = ei->i_data[block]; raw_inode->i_block[block] = ei->i_data[block];
......
...@@ -1603,7 +1603,7 @@ static int ext3_load_journal(struct super_block * sb, ...@@ -1603,7 +1603,7 @@ static int ext3_load_journal(struct super_block * sb,
{ {
journal_t *journal; journal_t *journal;
int journal_inum = le32_to_cpu(es->s_journal_inum); int journal_inum = le32_to_cpu(es->s_journal_inum);
dev_t journal_dev = le32_to_cpu(es->s_journal_dev); dev_t journal_dev = old_decode_dev(le32_to_cpu(es->s_journal_dev));
int err = 0; int err = 0;
int really_read_only; int really_read_only;
......
...@@ -333,7 +333,7 @@ vxfs_read_inode(struct inode *ip) ...@@ -333,7 +333,7 @@ vxfs_read_inode(struct inode *ip)
} else } else
ip->i_op = &vxfs_immed_symlink_iops; ip->i_op = &vxfs_immed_symlink_iops;
} else } else
init_special_inode(ip, ip->i_mode, vip->vii_rdev); init_special_inode(ip, ip->i_mode, old_decode_dev(vip->vii_rdev));
return; return;
} }
......
...@@ -391,13 +391,11 @@ static inline char *log_version(char *buf, struct presto_version *pv) ...@@ -391,13 +391,11 @@ static inline char *log_version(char *buf, struct presto_version *pv)
static inline char *log_rollback(char *buf, struct izo_rollback_data *rb) static inline char *log_rollback(char *buf, struct izo_rollback_data *rb)
{ {
struct izo_rollback_data rollback; struct izo_rollback_data rollback;
memcpy(&rollback, rb, sizeof(rollback));
rollback.rb_mode = HTON__u32(rollback.rb_mode); rollback.rb_mode = HTON__u32(rb->rb_mode);
rollback.rb_rdev = HTON__u32(rollback.rb_rdev); rollback.rb_rdev = HTON__u32(rb->rb_rdev);
rollback.rb_uid = HTON__u64(rollback.rb_uid); rollback.rb_uid = HTON__u64(rb->rb_uid);
rollback.rb_gid = HTON__u64(rollback.rb_gid); rollback.rb_gid = HTON__u64(rb->rb_gid);
return logit(buf, &rollback, sizeof(rollback)); return logit(buf, &rollback, sizeof(rollback));
} }
......
...@@ -236,7 +236,8 @@ static int reint_mknod(struct kml_rec *rec, struct file *dir, ...@@ -236,7 +236,8 @@ static int reint_mknod(struct kml_rec *rec, struct file *dir,
struct lento_vfs_context *info) struct lento_vfs_context *info)
{ {
struct run_ctxt saved_ctxt; struct run_ctxt saved_ctxt;
int error, dev; int error;
dev_t dev;
ENTRY; ENTRY;
...@@ -245,7 +246,7 @@ static int reint_mknod(struct kml_rec *rec, struct file *dir, ...@@ -245,7 +246,7 @@ static int reint_mknod(struct kml_rec *rec, struct file *dir,
info->updated_time.tv_nsec = rec->new_objectv->pv_ctime_nsec; info->updated_time.tv_nsec = rec->new_objectv->pv_ctime_nsec;
kmlreint_pre_secure(rec, dir, &saved_ctxt); kmlreint_pre_secure(rec, dir, &saved_ctxt);
dev = rec->rdev ?: MKDEV(rec->major, rec->minor); dev = rec->rdev ? old_decode_dev(rec->rdev) : MKDEV(rec->major, rec->minor);
error = lento_mknod(rec->path, rec->mode, dev, info); error = lento_mknod(rec->path, rec->mode, dev, info);
pop_ctxt(&saved_ctxt); pop_ctxt(&saved_ctxt);
......
...@@ -290,7 +290,7 @@ int presto_settime(struct presto_file_set *fset, ...@@ -290,7 +290,7 @@ int presto_settime(struct presto_file_set *fset,
void izo_get_rollback_data(struct inode *inode, struct izo_rollback_data *rb) void izo_get_rollback_data(struct inode *inode, struct izo_rollback_data *rb)
{ {
rb->rb_mode = (__u32)inode->i_mode; rb->rb_mode = (__u32)inode->i_mode;
rb->rb_rdev = (__u32)inode->i_rdev; rb->rb_rdev = (__u32)old_encode_dev(inode->i_rdev);
rb->rb_uid = (__u64)inode->i_uid; rb->rb_uid = (__u64)inode->i_uid;
rb->rb_gid = (__u64)inode->i_gid; rb->rb_gid = (__u64)inode->i_gid;
} }
......
...@@ -1079,11 +1079,9 @@ jffs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) ...@@ -1079,11 +1079,9 @@ jffs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
struct jffs_control *c; struct jffs_control *c;
struct inode *inode; struct inode *inode;
int result = 0; int result = 0;
u16 data; u16 data = old_encode_dev(rdev);
int err; int err;
data = (MAJOR(rdev) << 8) | MINOR(rdev);
D1(printk("***jffs_mknod()\n")); D1(printk("***jffs_mknod()\n"));
if (!old_valid_dev(rdev)) if (!old_valid_dev(rdev))
...@@ -1738,7 +1736,7 @@ jffs_read_inode(struct inode *inode) ...@@ -1738,7 +1736,7 @@ jffs_read_inode(struct inode *inode)
u16 val; u16 val;
jffs_read_data(f, (char *)val, 0, 2); jffs_read_data(f, (char *)val, 0, 2);
init_special_inode(inode, inode->i_mode, init_special_inode(inode, inode->i_mode,
MKDEV((val >> 8) & 255, val & 255)); old_decode_dev(val));
} }
D3(printk (KERN_NOTICE "read_inode(): up biglock\n")); D3(printk (KERN_NOTICE "read_inode(): up biglock\n"));
......
...@@ -604,7 +604,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, mk ...@@ -604,7 +604,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, mk
c = JFFS2_SB_INFO(dir_i->i_sb); c = JFFS2_SB_INFO(dir_i->i_sb);
if (S_ISBLK(mode) || S_ISCHR(mode)) { if (S_ISBLK(mode) || S_ISCHR(mode)) {
dev = cpu_to_je16((MAJOR(rdev) << 8) | MINOR(rdev)); dev = cpu_to_je16(old_encode_dev(rdev));
devlen = sizeof(dev); devlen = sizeof(dev);
} }
......
...@@ -147,7 +147,8 @@ void jffs2_read_inode (struct inode *inode) ...@@ -147,7 +147,8 @@ void jffs2_read_inode (struct inode *inode)
case S_IFSOCK: case S_IFSOCK:
case S_IFIFO: case S_IFIFO:
inode->i_op = &jffs2_file_inode_operations; inode->i_op = &jffs2_file_inode_operations;
init_special_inode(inode, inode->i_mode, MKDEV(je16_to_cpu(rdev)>>8, je16_to_cpu(rdev)&0xff)); init_special_inode(inode, inode->i_mode,
old_decode_dev(je16_to_cpu(rdev)));
break; break;
default: default:
......
...@@ -392,7 +392,7 @@ static void V1_minix_read_inode(struct inode * inode) ...@@ -392,7 +392,7 @@ static void V1_minix_read_inode(struct inode * inode)
inode->i_blocks = inode->i_blksize = 0; inode->i_blocks = inode->i_blksize = 0;
for (i = 0; i < 9; i++) for (i = 0; i < 9; i++)
minix_inode->u.i1_data[i] = raw_inode->i_zone[i]; minix_inode->u.i1_data[i] = raw_inode->i_zone[i];
minix_set_inode(inode, raw_inode->i_zone[0]); minix_set_inode(inode, old_decode_dev(raw_inode->i_zone[0]));
brelse(bh); brelse(bh);
} }
...@@ -425,7 +425,7 @@ static void V2_minix_read_inode(struct inode * inode) ...@@ -425,7 +425,7 @@ static void V2_minix_read_inode(struct inode * inode)
inode->i_blocks = inode->i_blksize = 0; inode->i_blocks = inode->i_blksize = 0;
for (i = 0; i < 10; i++) for (i = 0; i < 10; i++)
minix_inode->u.i2_data[i] = raw_inode->i_zone[i]; minix_inode->u.i2_data[i] = raw_inode->i_zone[i];
minix_set_inode(inode, raw_inode->i_zone[0]); minix_set_inode(inode, old_decode_dev(raw_inode->i_zone[0]));
brelse(bh); brelse(bh);
} }
...@@ -460,7 +460,7 @@ static struct buffer_head * V1_minix_update_inode(struct inode * inode) ...@@ -460,7 +460,7 @@ static struct buffer_head * V1_minix_update_inode(struct inode * inode)
raw_inode->i_size = inode->i_size; raw_inode->i_size = inode->i_size;
raw_inode->i_time = inode->i_mtime.tv_sec; raw_inode->i_time = inode->i_mtime.tv_sec;
if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
raw_inode->i_zone[0] = inode->i_rdev; raw_inode->i_zone[0] = old_encode_dev(inode->i_rdev);
else for (i = 0; i < 9; i++) else for (i = 0; i < 9; i++)
raw_inode->i_zone[i] = minix_inode->u.i1_data[i]; raw_inode->i_zone[i] = minix_inode->u.i1_data[i];
mark_buffer_dirty(bh); mark_buffer_dirty(bh);
...@@ -489,7 +489,7 @@ static struct buffer_head * V2_minix_update_inode(struct inode * inode) ...@@ -489,7 +489,7 @@ static struct buffer_head * V2_minix_update_inode(struct inode * inode)
raw_inode->i_atime = inode->i_atime.tv_sec; raw_inode->i_atime = inode->i_atime.tv_sec;
raw_inode->i_ctime = inode->i_ctime.tv_sec; raw_inode->i_ctime = inode->i_ctime.tv_sec;
if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
raw_inode->i_zone[0] = inode->i_rdev; raw_inode->i_zone[0] = old_encode_dev(inode->i_rdev);
else for (i = 0; i < 10; i++) else for (i = 0; i < 10; i++)
raw_inode->i_zone[i] = minix_inode->u.i2_data[i]; raw_inode->i_zone[i] = minix_inode->u.i2_data[i];
mark_buffer_dirty(bh); mark_buffer_dirty(bh);
......
...@@ -929,10 +929,10 @@ int ncp_create_new(struct inode *dir, struct dentry *dentry, int mode, ...@@ -929,10 +929,10 @@ int ncp_create_new(struct inode *dir, struct dentry *dentry, int mode,
finfo.access = opmode; finfo.access = opmode;
if (ncp_is_nfs_extras(server, finfo.volume)) { if (ncp_is_nfs_extras(server, finfo.volume)) {
finfo.i.nfs.mode = mode; finfo.i.nfs.mode = mode;
finfo.i.nfs.rdev = rdev; finfo.i.nfs.rdev = old_encode_dev(rdev);
if (ncp_modify_nfs_info(server, finfo.volume, if (ncp_modify_nfs_info(server, finfo.volume,
finfo.i.dirEntNum, finfo.i.dirEntNum,
mode, rdev) != 0) mode, old_encode_dev(rdev)) != 0)
goto out; goto out;
} }
......
...@@ -261,7 +261,8 @@ ncp_iget(struct super_block *sb, struct ncp_entry_info *info) ...@@ -261,7 +261,8 @@ ncp_iget(struct super_block *sb, struct ncp_entry_info *info)
inode->i_fop = &ncp_dir_operations; inode->i_fop = &ncp_dir_operations;
#ifdef CONFIG_NCPFS_NFS_NS #ifdef CONFIG_NCPFS_NFS_NS
} else if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode) || S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) { } else if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode) || S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) {
init_special_inode(inode, inode->i_mode, info->i.nfs.rdev); init_special_inode(inode, inode->i_mode,
old_decode_dev(info->i.nfs.rdev));
#endif #endif
#if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS) #if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS)
} else if (S_ISLNK(inode->i_mode)) { } else if (S_ISLNK(inode->i_mode)) {
......
...@@ -279,7 +279,8 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp, ...@@ -279,7 +279,8 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
int is_borc = 0; int is_borc = 0;
u32 size = attr->ia_size; u32 size = attr->ia_size;
rdev = (dev_t) size; /* may need to change when we widen dev_t */
rdev = old_decode_dev(size);
if (type != S_IFBLK && type != S_IFCHR) { if (type != S_IFBLK && type != S_IFCHR) {
rdev = 0; rdev = 0;
} else if (type == S_IFCHR && !(attr->ia_valid & ATTR_SIZE)) { } else if (type == S_IFCHR && !(attr->ia_valid & ATTR_SIZE)) {
......
...@@ -1003,7 +1003,7 @@ static void init_inode (struct inode * inode, struct path * path) ...@@ -1003,7 +1003,7 @@ static void init_inode (struct inode * inode, struct path * path)
inode->i_mapping->a_ops = &reiserfs_address_space_operations; inode->i_mapping->a_ops = &reiserfs_address_space_operations;
} else { } else {
inode->i_blocks = 0; inode->i_blocks = 0;
init_special_inode(inode, inode->i_mode, rdev) ; init_special_inode(inode, inode->i_mode, old_decode_dev(rdev));
} }
} }
...@@ -1024,7 +1024,7 @@ static void inode2sd (void * sd, struct inode * inode) ...@@ -1024,7 +1024,7 @@ static void inode2sd (void * sd, struct inode * inode)
set_sd_v2_ctime(sd_v2, inode->i_ctime.tv_sec ); set_sd_v2_ctime(sd_v2, inode->i_ctime.tv_sec );
set_sd_v2_blocks(sd_v2, inode->i_blocks ); set_sd_v2_blocks(sd_v2, inode->i_blocks );
if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
set_sd_v2_rdev(sd_v2, inode->i_rdev); set_sd_v2_rdev(sd_v2, old_encode_dev(inode->i_rdev));
else else
set_sd_v2_generation(sd_v2, inode->i_generation); set_sd_v2_generation(sd_v2, inode->i_generation);
flags = REISERFS_I(inode)->i_attrs; flags = REISERFS_I(inode)->i_attrs;
...@@ -1048,7 +1048,7 @@ static void inode2sd_v1 (void * sd, struct inode * inode) ...@@ -1048,7 +1048,7 @@ static void inode2sd_v1 (void * sd, struct inode * inode)
set_sd_v1_mtime(sd_v1, inode->i_mtime.tv_sec ); set_sd_v1_mtime(sd_v1, inode->i_mtime.tv_sec );
if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
set_sd_v1_rdev(sd_v1, inode->i_rdev); set_sd_v1_rdev(sd_v1, old_encode_dev(inode->i_rdev));
else else
set_sd_v1_blocks(sd_v1, inode->i_blocks ); set_sd_v1_blocks(sd_v1, inode->i_blocks );
......
...@@ -1906,7 +1906,7 @@ static int journal_init_dev( struct super_block *super, ...@@ -1906,7 +1906,7 @@ static int journal_init_dev( struct super_block *super,
journal -> j_dev_bd = NULL; journal -> j_dev_bd = NULL;
journal -> j_dev_file = NULL; journal -> j_dev_file = NULL;
jdev = SB_ONDISK_JOURNAL_DEVICE( super ) ? jdev = SB_ONDISK_JOURNAL_DEVICE( super ) ?
SB_ONDISK_JOURNAL_DEVICE( super ) : super->s_dev; old_decode_dev(SB_ONDISK_JOURNAL_DEVICE(super)) : super->s_dev;
if (bdev_read_only(super->s_bdev)) if (bdev_read_only(super->s_bdev))
blkdev_mode = FMODE_READ; blkdev_mode = FMODE_READ;
...@@ -1939,7 +1939,6 @@ static int journal_init_dev( struct super_block *super, ...@@ -1939,7 +1939,6 @@ static int journal_init_dev( struct super_block *super,
result = -ENOMEM; result = -ENOMEM;
} else { } else {
/* ok */ /* ok */
jdev = jdev_inode -> i_bdev -> bd_dev;
set_blocksize(journal->j_dev_bd, super->s_blocksize); set_blocksize(journal->j_dev_bd, super->s_blocksize);
} }
} else { } else {
......
...@@ -164,10 +164,8 @@ static void sysv_read_inode(struct inode *inode) ...@@ -164,10 +164,8 @@ static void sysv_read_inode(struct inode *inode)
struct buffer_head * bh; struct buffer_head * bh;
struct sysv_inode * raw_inode; struct sysv_inode * raw_inode;
struct sysv_inode_info * si; struct sysv_inode_info * si;
unsigned int block, ino; unsigned int block, ino = inode->i_ino;
dev_t rdev = 0;
ino = inode->i_ino;
if (!ino || ino > sbi->s_ninodes) { if (!ino || ino > sbi->s_ninodes) {
printk("Bad inode number on dev %s: %d is out of range\n", printk("Bad inode number on dev %s: %d is out of range\n",
inode->i_sb->s_id, ino); inode->i_sb->s_id, ino);
...@@ -198,10 +196,12 @@ static void sysv_read_inode(struct inode *inode) ...@@ -198,10 +196,12 @@ static void sysv_read_inode(struct inode *inode)
read3byte(sbi, &raw_inode->i_data[3*block], read3byte(sbi, &raw_inode->i_data[3*block],
(u8 *)&si->i_data[block]); (u8 *)&si->i_data[block]);
brelse(bh); brelse(bh);
if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
rdev = (u16)fs32_to_cpu(sbi, si->i_data[0]);
si->i_dir_start_lookup = 0; si->i_dir_start_lookup = 0;
sysv_set_inode(inode, rdev); if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
sysv_set_inode(inode,
old_decode_dev(fs32_to_cpu(sbi, si->i_data[0])));
else
sysv_set_inode(inode, 0);
return; return;
bad_inode: bad_inode:
...@@ -241,7 +241,7 @@ static struct buffer_head * sysv_update_inode(struct inode * inode) ...@@ -241,7 +241,7 @@ static struct buffer_head * sysv_update_inode(struct inode * inode)
si = SYSV_I(inode); si = SYSV_I(inode);
if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
si->i_data[0] = cpu_to_fs32(sbi, inode->i_rdev); si->i_data[0] = cpu_to_fs32(sbi, old_encode_dev(inode->i_rdev));
for (block = 0; block < 10+1+1+1; block++) for (block = 0; block < 10+1+1+1; block++)
write3byte(sbi, (u8 *)&si->i_data[block], write3byte(sbi, (u8 *)&si->i_data[block],
&raw_inode->i_data[3*block]); &raw_inode->i_data[3*block]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment