fs/jfs: Switch to use new generic UUID API
There are new types and helpers that are supposed to be used in new code. As a preparation to get rid of legacy types and API functions do the conversion here. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
This commit is contained in:

committed by
Dave Kleikamp

szülő
7ca5e8f089
commit
2e3bc61251
@@ -1092,8 +1092,7 @@ int lmLogOpen(struct super_block *sb)
|
||||
mutex_lock(&jfs_log_mutex);
|
||||
list_for_each_entry(log, &jfs_external_logs, journal_list) {
|
||||
if (log->bdev->bd_dev == sbi->logdev) {
|
||||
if (memcmp(log->uuid, sbi->loguuid,
|
||||
sizeof(log->uuid))) {
|
||||
if (!uuid_equal(&log->uuid, &sbi->loguuid)) {
|
||||
jfs_warn("wrong uuid on JFS journal");
|
||||
mutex_unlock(&jfs_log_mutex);
|
||||
return -EINVAL;
|
||||
@@ -1130,7 +1129,7 @@ int lmLogOpen(struct super_block *sb)
|
||||
}
|
||||
|
||||
log->bdev = bdev;
|
||||
memcpy(log->uuid, sbi->loguuid, sizeof(log->uuid));
|
||||
uuid_copy(&log->uuid, &sbi->loguuid);
|
||||
|
||||
/*
|
||||
* initialize log:
|
||||
@@ -1336,7 +1335,7 @@ int lmLogInit(struct jfs_log * log)
|
||||
jfs_info("lmLogInit: inline log:0x%p base:0x%Lx size:0x%x",
|
||||
log, (unsigned long long)log->base, log->size);
|
||||
} else {
|
||||
if (memcmp(logsuper->uuid, log->uuid, 16)) {
|
||||
if (!uuid_equal(&logsuper->uuid, &log->uuid)) {
|
||||
jfs_warn("wrong uuid on JFS log device");
|
||||
goto errout20;
|
||||
}
|
||||
@@ -1732,7 +1731,7 @@ static int lmLogFileSystem(struct jfs_log * log, struct jfs_sb_info *sbi,
|
||||
int i;
|
||||
struct logsuper *logsuper;
|
||||
struct lbuf *bpsuper;
|
||||
char *uuid = sbi->uuid;
|
||||
uuid_t *uuid = &sbi->uuid;
|
||||
|
||||
/*
|
||||
* insert/remove file system device to log active file system list.
|
||||
@@ -1743,8 +1742,8 @@ static int lmLogFileSystem(struct jfs_log * log, struct jfs_sb_info *sbi,
|
||||
logsuper = (struct logsuper *) bpsuper->l_ldata;
|
||||
if (activate) {
|
||||
for (i = 0; i < MAX_ACTIVE; i++)
|
||||
if (!memcmp(logsuper->active[i].uuid, NULL_UUID, 16)) {
|
||||
memcpy(logsuper->active[i].uuid, uuid, 16);
|
||||
if (uuid_is_null(&logsuper->active[i].uuid)) {
|
||||
uuid_copy(&logsuper->active[i].uuid, uuid);
|
||||
sbi->aggregate = i;
|
||||
break;
|
||||
}
|
||||
@@ -1755,8 +1754,9 @@ static int lmLogFileSystem(struct jfs_log * log, struct jfs_sb_info *sbi,
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < MAX_ACTIVE; i++)
|
||||
if (!memcmp(logsuper->active[i].uuid, uuid, 16)) {
|
||||
memcpy(logsuper->active[i].uuid, NULL_UUID, 16);
|
||||
if (uuid_equal(&logsuper->active[i].uuid, uuid)) {
|
||||
uuid_copy(&logsuper->active[i].uuid,
|
||||
&uuid_null);
|
||||
break;
|
||||
}
|
||||
if (i == MAX_ACTIVE) {
|
||||
|
Reference in New Issue
Block a user