Commit b8cac3cd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull jfs updates from Dave Kleikamp:
 "Several minor jfs fixes"

* tag 'jfs-5.2' of git://github.com/kleikamp/linux-shaggy:
  jfs: fix bogus variable self-initialization
  fs/jfs: Switch to use new generic UUID API
  jfs: compare old and new mode before setting update_mode flag
  jfs: remove incorrect comment in jfs_superblock
  jfs: fix spelling mistake, EACCESS -> EACCES
parents 9f2e3a53 a5fdd713
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -117,6 +117,7 @@ int jfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
		rc = posix_acl_update_mode(inode, &mode, &acl);
		rc = posix_acl_update_mode(inode, &mode, &acl);
		if (rc)
		if (rc)
			goto end_tx;
			goto end_tx;
		if (mode != inode->i_mode)
			update_mode = 1;
			update_mode = 1;
	}
	}
	rc = __jfs_set_acl(tid, inode, type, acl);
	rc = __jfs_set_acl(tid, inode, type, acl);
+4 −2
Original line number Original line Diff line number Diff line
@@ -23,6 +23,8 @@
#include <linux/rwsem.h>
#include <linux/rwsem.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/bitops.h>
#include <linux/bitops.h>
#include <linux/uuid.h>

#include "jfs_types.h"
#include "jfs_types.h"
#include "jfs_xtree.h"
#include "jfs_xtree.h"
#include "jfs_dtree.h"
#include "jfs_dtree.h"
@@ -178,8 +180,8 @@ struct jfs_sb_info {
	pxd_t		logpxd;		/* pxd describing log	*/
	pxd_t		logpxd;		/* pxd describing log	*/
	pxd_t		fsckpxd;	/* pxd describing fsck wkspc */
	pxd_t		fsckpxd;	/* pxd describing fsck wkspc */
	pxd_t		ait2;		/* pxd describing AIT copy	*/
	pxd_t		ait2;		/* pxd describing AIT copy	*/
	char		uuid[16];	/* 128-bit uuid for volume	*/
	uuid_t		uuid;		/* 128-bit uuid for volume	*/
	char		loguuid[16];	/* 128-bit uuid for log	*/
	uuid_t		loguuid;	/* 128-bit uuid for log	*/
	/*
	/*
	 * commit_state is used for synchronization of the jfs_commit
	 * commit_state is used for synchronization of the jfs_commit
	 * threads.  It is protected by LAZY_LOCK().
	 * threads.  It is protected by LAZY_LOCK().
+9 −9
Original line number Original line Diff line number Diff line
@@ -1092,8 +1092,7 @@ int lmLogOpen(struct super_block *sb)
	mutex_lock(&jfs_log_mutex);
	mutex_lock(&jfs_log_mutex);
	list_for_each_entry(log, &jfs_external_logs, journal_list) {
	list_for_each_entry(log, &jfs_external_logs, journal_list) {
		if (log->bdev->bd_dev == sbi->logdev) {
		if (log->bdev->bd_dev == sbi->logdev) {
			if (memcmp(log->uuid, sbi->loguuid,
			if (!uuid_equal(&log->uuid, &sbi->loguuid)) {
				   sizeof(log->uuid))) {
				jfs_warn("wrong uuid on JFS journal");
				jfs_warn("wrong uuid on JFS journal");
				mutex_unlock(&jfs_log_mutex);
				mutex_unlock(&jfs_log_mutex);
				return -EINVAL;
				return -EINVAL;
@@ -1130,7 +1129,7 @@ int lmLogOpen(struct super_block *sb)
	}
	}


	log->bdev = bdev;
	log->bdev = bdev;
	memcpy(log->uuid, sbi->loguuid, sizeof(log->uuid));
	uuid_copy(&log->uuid, &sbi->loguuid);


	/*
	/*
	 * initialize log:
	 * 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",
			jfs_info("lmLogInit: inline log:0x%p base:0x%Lx size:0x%x",
				 log, (unsigned long long)log->base, log->size);
				 log, (unsigned long long)log->base, log->size);
		} else {
		} else {
			if (memcmp(logsuper->uuid, log->uuid, 16)) {
			if (!uuid_equal(&logsuper->uuid, &log->uuid)) {
				jfs_warn("wrong uuid on JFS log device");
				jfs_warn("wrong uuid on JFS log device");
				goto errout20;
				goto errout20;
			}
			}
@@ -1732,7 +1731,7 @@ static int lmLogFileSystem(struct jfs_log * log, struct jfs_sb_info *sbi,
	int i;
	int i;
	struct logsuper *logsuper;
	struct logsuper *logsuper;
	struct lbuf *bpsuper;
	struct lbuf *bpsuper;
	char *uuid = sbi->uuid;
	uuid_t *uuid = &sbi->uuid;


	/*
	/*
	 * insert/remove file system device to log active file system list.
	 * 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;
	logsuper = (struct logsuper *) bpsuper->l_ldata;
	if (activate) {
	if (activate) {
		for (i = 0; i < MAX_ACTIVE; i++)
		for (i = 0; i < MAX_ACTIVE; i++)
			if (!memcmp(logsuper->active[i].uuid, NULL_UUID, 16)) {
			if (uuid_is_null(&logsuper->active[i].uuid)) {
				memcpy(logsuper->active[i].uuid, uuid, 16);
				uuid_copy(&logsuper->active[i].uuid, uuid);
				sbi->aggregate = i;
				sbi->aggregate = i;
				break;
				break;
			}
			}
@@ -1755,8 +1754,9 @@ static int lmLogFileSystem(struct jfs_log * log, struct jfs_sb_info *sbi,
		}
		}
	} else {
	} else {
		for (i = 0; i < MAX_ACTIVE; i++)
		for (i = 0; i < MAX_ACTIVE; i++)
			if (!memcmp(logsuper->active[i].uuid, uuid, 16)) {
			if (uuid_equal(&logsuper->active[i].uuid, uuid)) {
				memcpy(logsuper->active[i].uuid, NULL_UUID, 16);
				uuid_copy(&logsuper->active[i].uuid,
					  &uuid_null);
				break;
				break;
			}
			}
		if (i == MAX_ACTIVE) {
		if (i == MAX_ACTIVE) {
+5 −5
Original line number Original line Diff line number Diff line
@@ -19,6 +19,8 @@
#ifndef	_H_JFS_LOGMGR
#ifndef	_H_JFS_LOGMGR
#define _H_JFS_LOGMGR
#define _H_JFS_LOGMGR


#include <linux/uuid.h>

#include "jfs_filsys.h"
#include "jfs_filsys.h"
#include "jfs_lock.h"
#include "jfs_lock.h"


@@ -73,15 +75,13 @@ struct logsuper {
	__le32 state;		/* 4: state - see below */
	__le32 state;		/* 4: state - see below */


	__le32 end;		/* 4: addr of last log record set by logredo */
	__le32 end;		/* 4: addr of last log record set by logredo */
	char uuid[16];		/* 16: 128-bit journal uuid */
	uuid_t uuid;		/* 16: 128-bit journal uuid */
	char label[16];		/* 16: journal label */
	char label[16];		/* 16: journal label */
	struct {
	struct {
		char uuid[16];
		uuid_t uuid;
	} active[MAX_ACTIVE];	/* 2048: active file systems list */
	} active[MAX_ACTIVE];	/* 2048: active file systems list */
};
};


#define NULL_UUID "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"

/* log flag: commit option (see jfs_filsys.h) */
/* log flag: commit option (see jfs_filsys.h) */


/* log state */
/* log state */
@@ -410,7 +410,7 @@ struct jfs_log {
	spinlock_t synclock;	/* 4: synclist lock */
	spinlock_t synclock;	/* 4: synclist lock */
	struct lbuf *wqueue;	/* 4: log pageout queue */
	struct lbuf *wqueue;	/* 4: log pageout queue */
	int count;		/* 4: count */
	int count;		/* 4: count */
	char uuid[16];		/* 16: 128-bit uuid of log device */
	uuid_t uuid;		/* 16: 128-bit uuid of log device */


	int no_integrity;	/* 3: flag to disable journaling to disk */
	int no_integrity;	/* 3: flag to disable journaling to disk */
};
};
+2 −2
Original line number Original line Diff line number Diff line
@@ -389,8 +389,8 @@ static int chkSuper(struct super_block *sb)
		sbi->logpxd = j_sb->s_logpxd;
		sbi->logpxd = j_sb->s_logpxd;
	else {
	else {
		sbi->logdev = new_decode_dev(le32_to_cpu(j_sb->s_logdev));
		sbi->logdev = new_decode_dev(le32_to_cpu(j_sb->s_logdev));
		memcpy(sbi->uuid, j_sb->s_uuid, sizeof(sbi->uuid));
		uuid_copy(&sbi->uuid, &j_sb->s_uuid);
		memcpy(sbi->loguuid, j_sb->s_loguuid, sizeof(sbi->uuid));
		uuid_copy(&sbi->loguuid, &j_sb->s_loguuid);
	}
	}
	sbi->fsckpxd = j_sb->s_fsckpxd;
	sbi->fsckpxd = j_sb->s_fsckpxd;
	sbi->ait2 = j_sb->s_ait2;
	sbi->ait2 = j_sb->s_ait2;
Loading