Commit 81ffa38e authored by Adrian Hunter's avatar Adrian Hunter Committed by Artem Bityutskiy

UBIFS: always set i_generation to 0

UBIFS does not presently re-use inode numbers, so leaving
i_generation zero is most appropriate for now.
Signed-off-by: default avatarAdrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 3a13252c
...@@ -165,7 +165,6 @@ struct inode *ubifs_new_inode(struct ubifs_info *c, const struct inode *dir, ...@@ -165,7 +165,6 @@ struct inode *ubifs_new_inode(struct ubifs_info *c, const struct inode *dir,
} }
inode->i_ino = ++c->highest_inum; inode->i_ino = ++c->highest_inum;
inode->i_generation = ++c->vfs_gen;
/* /*
* The creation sequence number remains with this inode for its * The creation sequence number remains with this inode for its
* lifetime. All nodes for this inode have a greater sequence number, * lifetime. All nodes for this inode have a greater sequence number,
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/random.h>
#include <linux/kthread.h> #include <linux/kthread.h>
#include <linux/parser.h> #include <linux/parser.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
...@@ -1671,7 +1670,6 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -1671,7 +1670,6 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent)
INIT_LIST_HEAD(&c->orph_new); INIT_LIST_HEAD(&c->orph_new);
c->highest_inum = UBIFS_FIRST_INO; c->highest_inum = UBIFS_FIRST_INO;
get_random_bytes(&c->vfs_gen, sizeof(int));
c->lhead_lnum = c->ltail_lnum = UBIFS_LOG_LNUM; c->lhead_lnum = c->ltail_lnum = UBIFS_LOG_LNUM;
ubi_get_volume_info(ubi, &c->vi); ubi_get_volume_info(ubi, &c->vi);
......
...@@ -876,11 +876,10 @@ struct ubifs_mount_opts { ...@@ -876,11 +876,10 @@ struct ubifs_mount_opts {
* @bdi: backing device info object to make VFS happy and disable read-ahead * @bdi: backing device info object to make VFS happy and disable read-ahead
* *
* @highest_inum: highest used inode number * @highest_inum: highest used inode number
* @vfs_gen: VFS inode generation counter
* @max_sqnum: current global sequence number * @max_sqnum: current global sequence number
* @cmt_no: commit number of the last successfully completed commit, protected * @cmt_no: commit number of the last successfully completed commit, protected
* by @commit_sem * by @commit_sem
* @cnt_lock: protects @highest_inum, @vfs_gen, and @max_sqnum counters * @cnt_lock: protects @highest_inum and @max_sqnum counters
* @fmt_version: UBIFS on-flash format version * @fmt_version: UBIFS on-flash format version
* @uuid: UUID from super block * @uuid: UUID from super block
* *
...@@ -1117,7 +1116,6 @@ struct ubifs_info { ...@@ -1117,7 +1116,6 @@ struct ubifs_info {
struct backing_dev_info bdi; struct backing_dev_info bdi;
ino_t highest_inum; ino_t highest_inum;
unsigned int vfs_gen;
unsigned long long max_sqnum; unsigned long long max_sqnum;
unsigned long long cmt_no; unsigned long long cmt_no;
spinlock_t cnt_lock; spinlock_t cnt_lock;
......
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