diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2008-11-03 08:59:19 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-01-05 02:38:56 -0500 |
commit | ad6203f2b46c2217f74b2e88299640eef5889e72 (patch) | |
tree | 24197a5bc7ffac80071d2375ff46947cabe9b365 /fs/gfs2/inode.c | |
parent | bcf0b5b348a1f49c2c878ffdb78e68c930baabb8 (diff) |
GFS2: Move "entries" into "proper" inode
This moves the directory entry count into the proper inode.
Potentially we could get this to share the space used by
something else in the future, but this is one more step
on the way to removing the gfs2_dinode_host structure.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r-- | fs/gfs2/inode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 9d97f699c81a..015d4c007086 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -299,7 +299,7 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf) | |||
299 | if (unlikely(depth > GFS2_DIR_MAX_DEPTH)) | 299 | if (unlikely(depth > GFS2_DIR_MAX_DEPTH)) |
300 | goto corrupt; | 300 | goto corrupt; |
301 | ip->i_depth = (u8)depth; | 301 | ip->i_depth = (u8)depth; |
302 | di->di_entries = be32_to_cpu(str->di_entries); | 302 | ip->i_entries = be32_to_cpu(str->di_entries); |
303 | 303 | ||
304 | di->di_eattr = be64_to_cpu(str->di_eattr); | 304 | di->di_eattr = be64_to_cpu(str->di_eattr); |
305 | if (S_ISREG(ip->i_inode.i_mode)) | 305 | if (S_ISREG(ip->i_inode.i_mode)) |
@@ -689,7 +689,7 @@ static int create_ok(struct gfs2_inode *dip, const struct qstr *name, | |||
689 | return error; | 689 | return error; |
690 | } | 690 | } |
691 | 691 | ||
692 | if (dip->i_di.di_entries == (u32)-1) | 692 | if (dip->i_entries == (u32)-1) |
693 | return -EFBIG; | 693 | return -EFBIG; |
694 | if (S_ISDIR(mode) && dip->i_inode.i_nlink == (u32)-1) | 694 | if (S_ISDIR(mode) && dip->i_inode.i_nlink == (u32)-1) |
695 | return -EMLINK; | 695 | return -EMLINK; |
@@ -1067,7 +1067,7 @@ int gfs2_rmdiri(struct gfs2_inode *dip, const struct qstr *name, | |||
1067 | struct qstr dotname; | 1067 | struct qstr dotname; |
1068 | int error; | 1068 | int error; |
1069 | 1069 | ||
1070 | if (ip->i_di.di_entries != 2) { | 1070 | if (ip->i_entries != 2) { |
1071 | if (gfs2_consist_inode(ip)) | 1071 | if (gfs2_consist_inode(ip)) |
1072 | gfs2_dinode_print(ip); | 1072 | gfs2_dinode_print(ip); |
1073 | return -EIO; | 1073 | return -EIO; |
@@ -1271,7 +1271,7 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) | |||
1271 | !(ip->i_di.di_flags & GFS2_DIF_EXHASH) ? | 1271 | !(ip->i_di.di_flags & GFS2_DIF_EXHASH) ? |
1272 | GFS2_FORMAT_DE : 0); | 1272 | GFS2_FORMAT_DE : 0); |
1273 | str->di_depth = cpu_to_be16(ip->i_depth); | 1273 | str->di_depth = cpu_to_be16(ip->i_depth); |
1274 | str->di_entries = cpu_to_be32(di->di_entries); | 1274 | str->di_entries = cpu_to_be32(ip->i_entries); |
1275 | 1275 | ||
1276 | str->di_eattr = cpu_to_be64(di->di_eattr); | 1276 | str->di_eattr = cpu_to_be64(di->di_eattr); |
1277 | str->di_atime_nsec = cpu_to_be32(ip->i_inode.i_atime.tv_nsec); | 1277 | str->di_atime_nsec = cpu_to_be32(ip->i_inode.i_atime.tv_nsec); |
@@ -1295,7 +1295,7 @@ void gfs2_dinode_print(const struct gfs2_inode *ip) | |||
1295 | printk(KERN_INFO " di_flags = 0x%.8X\n", di->di_flags); | 1295 | printk(KERN_INFO " di_flags = 0x%.8X\n", di->di_flags); |
1296 | printk(KERN_INFO " i_height = %u\n", ip->i_height); | 1296 | printk(KERN_INFO " i_height = %u\n", ip->i_height); |
1297 | printk(KERN_INFO " i_depth = %u\n", ip->i_depth); | 1297 | printk(KERN_INFO " i_depth = %u\n", ip->i_depth); |
1298 | printk(KERN_INFO " di_entries = %u\n", di->di_entries); | 1298 | printk(KERN_INFO " i_entries = %u\n", ip->i_entries); |
1299 | printk(KERN_INFO " di_eattr = %llu\n", | 1299 | printk(KERN_INFO " di_eattr = %llu\n", |
1300 | (unsigned long long)di->di_eattr); | 1300 | (unsigned long long)di->di_eattr); |
1301 | } | 1301 | } |