Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
ad1da81a
Commit
ad1da81a
authored
Sep 04, 2003
by
Alexander Viro
Committed by
Linus Torvalds
Sep 04, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] large dev_t - second series (7/15)
the last kdev_t object is gone; ->i_rdev switched to dev_t.
parent
cbac67b1
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
46 additions
and
48 deletions
+46
-48
drivers/char/tty_io.c
drivers/char/tty_io.c
+1
-1
drivers/md/dm-table.c
drivers/md/dm-table.c
+1
-1
fs/block_dev.c
fs/block_dev.c
+2
-2
fs/char_dev.c
fs/char_dev.c
+1
-1
fs/cifs/file.c
fs/cifs/file.c
+2
-2
fs/cifs/inode.c
fs/cifs/inode.c
+2
-2
fs/devfs/base.c
fs/devfs/base.c
+2
-2
fs/ext2/inode.c
fs/ext2/inode.c
+1
-1
fs/ext3/inode.c
fs/ext3/inode.c
+1
-1
fs/hpfs/inode.c
fs/hpfs/inode.c
+1
-1
fs/inode.c
fs/inode.c
+3
-3
fs/intermezzo/vfs.c
fs/intermezzo/vfs.c
+1
-1
fs/isofs/inode.c
fs/isofs/inode.c
+1
-2
fs/isofs/rock.c
fs/isofs/rock.c
+2
-2
fs/jffs2/super.c
fs/jffs2/super.c
+3
-3
fs/jfs/inode.c
fs/jfs/inode.c
+1
-2
fs/jfs/jfs_imap.c
fs/jfs/jfs_imap.c
+2
-2
fs/minix/inode.c
fs/minix/inode.c
+2
-2
fs/nfsd/nfsproc.c
fs/nfsd/nfsproc.c
+2
-2
fs/reiserfs/inode.c
fs/reiserfs/inode.c
+2
-2
fs/stat.c
fs/stat.c
+1
-1
fs/sysv/inode.c
fs/sysv/inode.c
+1
-1
fs/udf/inode.c
fs/udf/inode.c
+2
-2
fs/ufs/inode.c
fs/ufs/inode.c
+1
-1
fs/xfs/linux/xfs_iops.c
fs/xfs/linux/xfs_iops.c
+1
-1
fs/xfs/linux/xfs_super.c
fs/xfs/linux/xfs_super.c
+2
-2
fs/xfs/xfs_types.h
fs/xfs/xfs_types.h
+1
-1
fs/xfs/xfsidbg.c
fs/xfs/xfsidbg.c
+1
-1
include/linux/fs.h
include/linux/fs.h
+3
-3
No files found.
drivers/char/tty_io.c
View file @
ad1da81a
...
...
@@ -1295,7 +1295,7 @@ static int tty_open(struct inode * inode, struct file * filp)
int
noctty
,
retval
;
struct
tty_driver
*
driver
;
int
index
;
dev_t
device
=
kdev_t_to_nr
(
inode
->
i_rdev
)
;
dev_t
device
=
inode
->
i_rdev
;
unsigned
short
saved_flags
=
filp
->
f_flags
;
retry_open:
noctty
=
filp
->
f_flags
&
O_NOCTTY
;
...
...
drivers/md/dm-table.c
View file @
ad1da81a
...
...
@@ -312,7 +312,7 @@ static int lookup_device(const char *path, dev_t *dev)
goto
out
;
}
*
dev
=
kdev_t_to_nr
(
inode
->
i_rdev
)
;
*
dev
=
inode
->
i_rdev
;
out:
path_release
(
&
nd
);
...
...
fs/block_dev.c
View file @
ad1da81a
...
...
@@ -345,7 +345,7 @@ struct block_device *bdget(dev_t dev)
bdev
->
bd_part_count
=
0
;
bdev
->
bd_invalidated
=
0
;
inode
->
i_mode
=
S_IFBLK
;
inode
->
i_rdev
=
to_kdev_t
(
dev
)
;
inode
->
i_rdev
=
dev
;
inode
->
i_bdev
=
bdev
;
inode
->
i_data
.
a_ops
=
&
def_blk_aops
;
mapping_set_gfp_mask
(
&
inode
->
i_data
,
GFP_USER
);
...
...
@@ -386,7 +386,7 @@ int bd_acquire(struct inode *inode)
return
0
;
}
spin_unlock
(
&
bdev_lock
);
bdev
=
bdget
(
kdev_t_to_nr
(
inode
->
i_rdev
)
);
bdev
=
bdget
(
inode
->
i_rdev
);
if
(
!
bdev
)
return
-
ENOMEM
;
spin_lock
(
&
bdev_lock
);
...
...
fs/char_dev.c
View file @
ad1da81a
...
...
@@ -265,7 +265,7 @@ int chrdev_open(struct inode * inode, struct file * filp)
struct
kobject
*
kobj
;
int
idx
;
spin_unlock
(
&
cdev_lock
);
kobj
=
kobj_lookup
(
cdev_map
,
kdev_t_to_nr
(
inode
->
i_rdev
)
,
&
idx
);
kobj
=
kobj_lookup
(
cdev_map
,
inode
->
i_rdev
,
&
idx
);
if
(
!
kobj
)
return
-
ENODEV
;
new
=
container_of
(
kobj
,
struct
cdev
,
kobj
);
...
...
fs/cifs/file.c
View file @
ad1da81a
...
...
@@ -1024,7 +1024,7 @@ fill_in_inode(struct inode *tmp_inode,
}
else
{
cFYI
(
1
,
(
" Init special inode "
));
init_special_inode
(
tmp_inode
,
tmp_inode
->
i_mode
,
kdev_t_to_nr
(
tmp_inode
->
i_rdev
)
);
tmp_inode
->
i_rdev
);
}
}
...
...
@@ -1094,7 +1094,7 @@ unix_fill_in_inode(struct inode *tmp_inode,
}
else
{
cFYI
(
1
,
(
" Init special inode "
));
init_special_inode
(
tmp_inode
,
tmp_inode
->
i_mode
,
kdev_t_to_nr
(
tmp_inode
->
i_rdev
)
);
tmp_inode
->
i_rdev
);
}
}
...
...
fs/cifs/inode.c
View file @
ad1da81a
...
...
@@ -154,7 +154,7 @@ cifs_get_inode_info_unix(struct inode **pinode,
}
else
{
cFYI
(
1
,
(
" Init special inode "
));
init_special_inode
(
inode
,
inode
->
i_mode
,
kdev_t_to_nr
(
inode
->
i_rdev
)
);
inode
->
i_rdev
);
}
}
FreeXid
(
xid
);
...
...
@@ -298,7 +298,7 @@ cifs_get_inode_info(struct inode **pinode, const unsigned char *search_path,
inode
->
i_op
=
&
cifs_symlink_inode_ops
;
}
else
{
init_special_inode
(
inode
,
inode
->
i_mode
,
kdev_t_to_nr
(
inode
->
i_rdev
)
);
inode
->
i_rdev
);
}
}
if
(
buf
)
...
...
fs/devfs/base.c
View file @
ad1da81a
...
...
@@ -2012,11 +2012,11 @@ static struct inode *_devfs_get_vfs_inode (struct super_block *sb,
inode
->
i_fop
=
&
devfs_fops
;
if
(
S_ISCHR
(
de
->
mode
)
)
{
inode
->
i_rdev
=
to_kdev_t
(
de
->
u
.
cdev
.
dev
)
;
inode
->
i_rdev
=
de
->
u
.
cdev
.
dev
;
}
else
if
(
S_ISBLK
(
de
->
mode
)
)
{
inode
->
i_rdev
=
to_kdev_t
(
de
->
u
.
bdev
.
dev
)
;
inode
->
i_rdev
=
de
->
u
.
bdev
.
dev
;
if
(
bd_acquire
(
inode
)
!=
0
)
PRINTK
(
"(%d): no block device from bdget()
\n
"
,(
int
)
inode
->
i_ino
);
}
...
...
fs/ext2/inode.c
View file @
ad1da81a
...
...
@@ -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
);
if
(
S_ISCHR
(
inode
->
i_mode
)
||
S_ISBLK
(
inode
->
i_mode
))
raw_inode
->
i_block
[
0
]
=
cpu_to_le32
(
kdev_t_to_nr
(
inode
->
i_rdev
)
);
raw_inode
->
i_block
[
0
]
=
cpu_to_le32
(
inode
->
i_rdev
);
else
for
(
n
=
0
;
n
<
EXT2_N_BLOCKS
;
n
++
)
raw_inode
->
i_block
[
n
]
=
ei
->
i_data
[
n
];
mark_buffer_dirty
(
bh
);
...
...
fs/ext3/inode.c
View file @
ad1da81a
...
...
@@ -2668,7 +2668,7 @@ static int ext3_do_update_inode(handle_t *handle,
raw_inode
->
i_generation
=
cpu_to_le32
(
inode
->
i_generation
);
if
(
S_ISCHR
(
inode
->
i_mode
)
||
S_ISBLK
(
inode
->
i_mode
))
raw_inode
->
i_block
[
0
]
=
cpu_to_le32
(
kdev_t_to_nr
(
inode
->
i_rdev
)
);
cpu_to_le32
(
inode
->
i_rdev
);
else
for
(
block
=
0
;
block
<
EXT3_N_BLOCKS
;
block
++
)
raw_inode
->
i_block
[
block
]
=
ei
->
i_data
[
block
];
...
...
fs/hpfs/inode.c
View file @
ad1da81a
...
...
@@ -225,7 +225,7 @@ void hpfs_write_inode_ea(struct inode *i, struct fnode *fnode)
hpfs_inode
->
i_ea_mode
=
1
;
}
if
(
S_ISBLK
(
i
->
i_mode
)
||
S_ISCHR
(
i
->
i_mode
))
{
int
d
=
kdev_t_to_nr
(
i
->
i_rdev
)
;
dev_t
d
=
i
->
i_rdev
;
ea
[
0
]
=
d
&
0xff
;
ea
[
1
]
=
(
d
>>
8
)
&
0xff
;
ea
[
2
]
=
(
d
>>
16
)
&
0xff
;
...
...
fs/inode.c
View file @
ad1da81a
...
...
@@ -130,7 +130,7 @@ static struct inode *alloc_inode(struct super_block *sb)
inode
->
i_pipe
=
NULL
;
inode
->
i_bdev
=
NULL
;
inode
->
i_cdev
=
NULL
;
inode
->
i_rdev
=
to_kdev_t
(
0
)
;
inode
->
i_rdev
=
0
;
inode
->
i_security
=
NULL
;
if
(
security_inode_alloc
(
inode
))
{
if
(
inode
->
i_sb
->
s_op
->
destroy_inode
)
...
...
@@ -1363,10 +1363,10 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
inode
->
i_mode
=
mode
;
if
(
S_ISCHR
(
mode
))
{
inode
->
i_fop
=
&
def_chr_fops
;
inode
->
i_rdev
=
to_kdev_t
(
rdev
)
;
inode
->
i_rdev
=
rdev
;
}
else
if
(
S_ISBLK
(
mode
))
{
inode
->
i_fop
=
&
def_blk_fops
;
inode
->
i_rdev
=
to_kdev_t
(
rdev
)
;
inode
->
i_rdev
=
rdev
;
}
else
if
(
S_ISFIFO
(
mode
))
inode
->
i_fop
=
&
def_fifo_fops
;
else
if
(
S_ISSOCK
(
mode
))
...
...
fs/intermezzo/vfs.c
View file @
ad1da81a
...
...
@@ -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
)
{
rb
->
rb_mode
=
(
__u32
)
inode
->
i_mode
;
rb
->
rb_rdev
=
(
__u32
)
kdev_t_to_nr
(
inode
->
i_rdev
)
;
rb
->
rb_rdev
=
(
__u32
)
inode
->
i_rdev
;
rb
->
rb_uid
=
(
__u64
)
inode
->
i_uid
;
rb
->
rb_gid
=
(
__u64
)
inode
->
i_gid
;
}
...
...
fs/isofs/inode.c
View file @
ad1da81a
...
...
@@ -1329,8 +1329,7 @@ static void isofs_read_inode(struct inode * inode)
inode
->
i_data
.
a_ops
=
&
isofs_symlink_aops
;
}
else
/* XXX - parse_rock_ridge_inode() had already set i_rdev. */
init_special_inode
(
inode
,
inode
->
i_mode
,
kdev_t_to_nr
(
inode
->
i_rdev
));
init_special_inode
(
inode
,
inode
->
i_mode
,
inode
->
i_rdev
);
out:
if
(
tmpde
)
...
...
fs/isofs/rock.c
View file @
ad1da81a
...
...
@@ -228,9 +228,9 @@ int parse_rock_ridge_inode_internal(struct iso_directory_record * de,
* stored in the low field, and use that.
*/
if
((
low
&
~
0xff
)
&&
high
==
0
)
{
inode
->
i_rdev
=
mk_kdev
(
low
>>
8
,
low
&
0xff
);
inode
->
i_rdev
=
MKDEV
(
low
>>
8
,
low
&
0xff
);
}
else
{
inode
->
i_rdev
=
mk_kdev
(
high
,
low
);
inode
->
i_rdev
=
MKDEV
(
high
,
low
);
}
}
break
;
...
...
fs/jffs2/super.c
View file @
ad1da81a
...
...
@@ -174,7 +174,7 @@ static struct super_block *jffs2_get_sb(struct file_system_type *fs_type,
int
err
;
struct
nameidata
nd
;
int
mtdnr
;
k
dev_t
dev
;
dev_t
dev
;
if
(
!
dev_name
)
return
ERR_PTR
(
-
EINVAL
);
...
...
@@ -240,14 +240,14 @@ static struct super_block *jffs2_get_sb(struct file_system_type *fs_type,
dev
=
nd
.
dentry
->
d_inode
->
i_rdev
;
path_release
(
&
nd
);
if
(
major
(
dev
)
!=
MTD_BLOCK_MAJOR
)
{
if
(
MAJOR
(
dev
)
!=
MTD_BLOCK_MAJOR
)
{
if
(
!
(
flags
&
MS_VERBOSE
))
/* Yes I mean this. Strangely */
printk
(
KERN_NOTICE
"Attempt to mount non-MTD device
\"
%s
\"
as JFFS2
\n
"
,
dev_name
);
return
ERR_PTR
(
-
EINVAL
);
}
return
jffs2_get_sb_mtdnr
(
fs_type
,
flags
,
dev_name
,
data
,
minor
(
dev
));
return
jffs2_get_sb_mtdnr
(
fs_type
,
flags
,
dev_name
,
data
,
MINOR
(
dev
));
}
...
...
fs/jfs/inode.c
View file @
ad1da81a
...
...
@@ -61,8 +61,7 @@ void jfs_read_inode(struct inode *inode)
inode
->
i_op
=
&
jfs_symlink_inode_operations
;
}
else
{
inode
->
i_op
=
&
jfs_file_inode_operations
;
init_special_inode
(
inode
,
inode
->
i_mode
,
kdev_t_to_nr
(
inode
->
i_rdev
));
init_special_inode
(
inode
,
inode
->
i_mode
,
inode
->
i_rdev
);
}
}
...
...
fs/jfs/jfs_imap.c
View file @
ad1da81a
...
...
@@ -3043,7 +3043,7 @@ static int copy_from_dinode(struct dinode * dip, struct inode *ip)
jfs_ip
->
acltype
=
le32_to_cpu
(
dip
->
di_acltype
);
if
(
S_ISCHR
(
ip
->
i_mode
)
||
S_ISBLK
(
ip
->
i_mode
))
ip
->
i_rdev
=
to_kdev_t
(
le32_to_cpu
(
dip
->
di_rdev
)
);
ip
->
i_rdev
=
le32_to_cpu
(
dip
->
di_rdev
);
if
(
S_ISDIR
(
ip
->
i_mode
))
{
memcpy
(
&
jfs_ip
->
i_dirtable
,
&
dip
->
di_dirtable
,
384
);
...
...
@@ -3102,7 +3102,7 @@ static void copy_to_dinode(struct dinode * dip, struct inode *ip)
dip
->
di_acltype
=
cpu_to_le32
(
jfs_ip
->
acltype
);
if
(
S_ISCHR
(
ip
->
i_mode
)
||
S_ISBLK
(
ip
->
i_mode
))
dip
->
di_rdev
=
cpu_to_le32
(
kdev_t_to_nr
(
ip
->
i_rdev
)
);
dip
->
di_rdev
=
cpu_to_le32
(
ip
->
i_rdev
);
}
#ifdef _JFS_DEBUG_IMAP
...
...
fs/minix/inode.c
View file @
ad1da81a
...
...
@@ -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_time
=
inode
->
i_mtime
.
tv_sec
;
if
(
S_ISCHR
(
inode
->
i_mode
)
||
S_ISBLK
(
inode
->
i_mode
))
raw_inode
->
i_zone
[
0
]
=
kdev_t_to_nr
(
inode
->
i_rdev
)
;
raw_inode
->
i_zone
[
0
]
=
inode
->
i_rdev
;
else
for
(
i
=
0
;
i
<
9
;
i
++
)
raw_inode
->
i_zone
[
i
]
=
minix_inode
->
u
.
i1_data
[
i
];
mark_buffer_dirty
(
bh
);
...
...
@@ -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_ctime
=
inode
->
i_ctime
.
tv_sec
;
if
(
S_ISCHR
(
inode
->
i_mode
)
||
S_ISBLK
(
inode
->
i_mode
))
raw_inode
->
i_zone
[
0
]
=
kdev_t_to_nr
(
inode
->
i_rdev
)
;
raw_inode
->
i_zone
[
0
]
=
inode
->
i_rdev
;
else
for
(
i
=
0
;
i
<
10
;
i
++
)
raw_inode
->
i_zone
[
i
]
=
minix_inode
->
u
.
i2_data
[
i
];
mark_buffer_dirty
(
bh
);
...
...
fs/nfsd/nfsproc.c
View file @
ad1da81a
...
...
@@ -242,7 +242,7 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
case
S_IFCHR
:
case
S_IFBLK
:
/* reserve rdev for later checking */
attr
->
ia_size
=
kdev_t_to_nr
(
inode
->
i_rdev
)
;
attr
->
ia_size
=
inode
->
i_rdev
;
attr
->
ia_valid
|=
ATTR_SIZE
;
/* FALLTHROUGH */
...
...
@@ -300,7 +300,7 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
/* Make sure the type and device matches */
nfserr
=
nfserr_exist
;
if
(
inode
&&
(
type
!=
(
inode
->
i_mode
&
S_IFMT
)
||
(
is_borc
&&
kdev_t_to_nr
(
inode
->
i_rdev
)
!=
rdev
)))
(
is_borc
&&
inode
->
i_rdev
!=
rdev
)))
goto
out_unlock
;
}
...
...
fs/reiserfs/inode.c
View file @
ad1da81a
...
...
@@ -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_blocks
(
sd_v2
,
inode
->
i_blocks
);
if
(
S_ISCHR
(
inode
->
i_mode
)
||
S_ISBLK
(
inode
->
i_mode
))
set_sd_v2_rdev
(
sd_v2
,
kdev_t_to_nr
(
inode
->
i_rdev
)
);
set_sd_v2_rdev
(
sd_v2
,
inode
->
i_rdev
);
else
set_sd_v2_generation
(
sd_v2
,
inode
->
i_generation
);
flags
=
REISERFS_I
(
inode
)
->
i_attrs
;
...
...
@@ -1048,7 +1048,7 @@ static void inode2sd_v1 (void * sd, struct inode * inode)
set_sd_v1_mtime
(
sd_v1
,
inode
->
i_mtime
.
tv_sec
);
if
(
S_ISCHR
(
inode
->
i_mode
)
||
S_ISBLK
(
inode
->
i_mode
))
set_sd_v1_rdev
(
sd_v1
,
kdev_t_to_nr
(
inode
->
i_rdev
)
);
set_sd_v1_rdev
(
sd_v1
,
inode
->
i_rdev
);
else
set_sd_v1_blocks
(
sd_v1
,
inode
->
i_blocks
);
...
...
fs/stat.c
View file @
ad1da81a
...
...
@@ -24,7 +24,7 @@ void generic_fillattr(struct inode *inode, struct kstat *stat)
stat
->
nlink
=
inode
->
i_nlink
;
stat
->
uid
=
inode
->
i_uid
;
stat
->
gid
=
inode
->
i_gid
;
stat
->
rdev
=
kdev_t_to_nr
(
inode
->
i_rdev
)
;
stat
->
rdev
=
inode
->
i_rdev
;
stat
->
atime
=
inode
->
i_atime
;
stat
->
mtime
=
inode
->
i_mtime
;
stat
->
ctime
=
inode
->
i_ctime
;
...
...
fs/sysv/inode.c
View file @
ad1da81a
...
...
@@ -241,7 +241,7 @@ static struct buffer_head * sysv_update_inode(struct inode * inode)
si
=
SYSV_I
(
inode
);
if
(
S_ISCHR
(
inode
->
i_mode
)
||
S_ISBLK
(
inode
->
i_mode
))
si
->
i_data
[
0
]
=
cpu_to_fs32
(
sbi
,
kdev_t_to_nr
(
inode
->
i_rdev
)
);
si
->
i_data
[
0
]
=
cpu_to_fs32
(
sbi
,
inode
->
i_rdev
);
for
(
block
=
0
;
block
<
10
+
1
+
1
+
1
;
block
++
)
write3byte
(
sbi
,
(
u8
*
)
&
si
->
i_data
[
block
],
&
raw_inode
->
i_data
[
3
*
block
]);
...
...
fs/udf/inode.c
View file @
ad1da81a
...
...
@@ -1392,8 +1392,8 @@ udf_update_inode(struct inode *inode, int do_sync)
strcpy
(
eid
->
ident
,
UDF_ID_DEVELOPER
);
eid
->
identSuffix
[
0
]
=
UDF_OS_CLASS_UNIX
;
eid
->
identSuffix
[
1
]
=
UDF_OS_ID_LINUX
;
dsea
->
majorDeviceIdent
=
kdev_t_to_nr
(
inode
->
i_rdev
)
>>
8
;
dsea
->
minorDeviceIdent
=
kdev_t_to_nr
(
inode
->
i_rdev
)
&
0xFF
;
dsea
->
majorDeviceIdent
=
inode
->
i_rdev
>>
8
;
dsea
->
minorDeviceIdent
=
inode
->
i_rdev
&
0xFF
;
mark_buffer_dirty_inode
(
tbh
,
inode
);
udf_release_data
(
tbh
);
}
...
...
fs/ufs/inode.c
View file @
ad1da81a
...
...
@@ -619,7 +619,7 @@ static int ufs_update_inode(struct inode * inode, int do_sync)
}
if
(
S_ISCHR
(
inode
->
i_mode
)
||
S_ISBLK
(
inode
->
i_mode
))
ufs_inode
->
ui_u2
.
ui_addr
.
ui_db
[
0
]
=
cpu_to_fs32
(
sb
,
kdev_t_to_nr
(
inode
->
i_rdev
)
);
ufs_inode
->
ui_u2
.
ui_addr
.
ui_db
[
0
]
=
cpu_to_fs32
(
sb
,
inode
->
i_rdev
);
else
if
(
inode
->
i_blocks
)
{
for
(
i
=
0
;
i
<
(
UFS_NDADDR
+
UFS_NINDIR
);
i
++
)
ufs_inode
->
ui_u2
.
ui_addr
.
ui_db
[
i
]
=
ufsi
->
i_u1
.
i_data
[
i
];
...
...
fs/xfs/linux/xfs_iops.c
View file @
ad1da81a
...
...
@@ -178,7 +178,7 @@ linvfs_mknod(
ip
=
LINVFS_GET_IP
(
vp
);
if
(
S_ISCHR
(
mode
)
||
S_ISBLK
(
mode
))
ip
->
i_rdev
=
to_kdev_t
(
rdev
)
;
ip
->
i_rdev
=
rdev
;
else
if
(
S_ISDIR
(
mode
))
validate_fields
(
ip
);
d_instantiate
(
dentry
,
ip
);
...
...
fs/xfs/linux/xfs_super.c
View file @
ad1da81a
...
...
@@ -154,7 +154,7 @@ xfs_set_inodeops(
}
else
{
inode
->
i_op
=
&
linvfs_file_inode_operations
;
init_special_inode
(
inode
,
inode
->
i_mode
,
kdev_t_to_nr
(
inode
->
i_rdev
)
);
inode
->
i_rdev
);
}
}
...
...
@@ -171,7 +171,7 @@ xfs_revalidate_inode(
inode
->
i_uid
=
ip
->
i_d
.
di_uid
;
inode
->
i_gid
=
ip
->
i_d
.
di_gid
;
if
(((
1
<<
vp
->
v_type
)
&
((
1
<<
VBLK
)
|
(
1
<<
VCHR
)))
==
0
)
{
inode
->
i_rdev
=
NODEV
;
inode
->
i_rdev
=
0
;
}
else
{
xfs_dev_t
dev
=
ip
->
i_df
.
if_u2
.
if_rdev
;
inode
->
i_rdev
=
XFS_DEV_TO_KDEVT
(
dev
);
...
...
fs/xfs/xfs_types.h
View file @
ad1da81a
...
...
@@ -210,6 +210,6 @@ typedef enum {
#define XFS_MKDEV(major,minor) ((xfs_dev_t)(((major)<<XFS_DEV_BITSMINOR) \
| (minor&XFS_DEV_MAXMIN)))
#define XFS_DEV_TO_KDEVT(dev)
mk_kdev
(XFS_DEV_MAJOR(dev),XFS_DEV_MINOR(dev))
#define XFS_DEV_TO_KDEVT(dev)
MKDEV
(XFS_DEV_MAJOR(dev),XFS_DEV_MINOR(dev))
#endif
/* !__XFS_TYPES_H */
fs/xfs/xfsidbg.c
View file @
ad1da81a
...
...
@@ -1687,7 +1687,7 @@ static void printinode(struct inode *ip)
kdb_printf
(
" i_mode = 0x%x i_nlink = %d i_rdev = 0x%x i_state = 0x%lx
\n
"
,
ip
->
i_mode
,
ip
->
i_nlink
,
kdev_t_to_nr
(
ip
->
i_rdev
)
,
ip
->
i_state
);
ip
->
i_rdev
,
ip
->
i_state
);
kdb_printf
(
" i_hash.nxt = 0x%p i_hash.prv = 0x%p
\n
"
,
ip
->
i_hash
.
next
,
ip
->
i_hash
.
prev
);
...
...
include/linux/fs.h
View file @
ad1da81a
...
...
@@ -373,7 +373,7 @@ struct inode {
unsigned
int
i_nlink
;
uid_t
i_uid
;
gid_t
i_gid
;
k
dev_t
i_rdev
;
dev_t
i_rdev
;
loff_t
i_size
;
struct
timespec
i_atime
;
struct
timespec
i_mtime
;
...
...
@@ -469,12 +469,12 @@ static inline void i_size_write(struct inode *inode, loff_t i_size)
static
inline
unsigned
iminor
(
struct
inode
*
inode
)
{
return
minor
(
inode
->
i_rdev
);
return
MINOR
(
inode
->
i_rdev
);
}
static
inline
unsigned
imajor
(
struct
inode
*
inode
)
{
return
major
(
inode
->
i_rdev
);
return
MAJOR
(
inode
->
i_rdev
);
}
struct
fown_struct
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment