Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

JFS: always load filesystem UUID during mount

The filesystem UUID was only being loaded into super_block sb when an
external journal device was in use. When mounting without an external
journal, the UUID remained unset, which prevented the computation of
a filesystem ID (fsid), which could be confirmed via `stat -f -c "%i"`
and thus user space could not use fanotify correctly.

A missing filesystem ID causes fanotify to return ENODEV when marking
the filesystem for events like FAN_CREATE, FAN_DELETE, FAN_MOVED_TO,
and FAN_MOVED_FROM. As a result, applications relying on fanotify
could not monitor these events on JFS filesystems without an external
journal.

Moved the UUID initialization so it is always performed during mount,
ensuring the superblock UUID is consistently available.

Signed-off-by: João Paredes <joaommp@yahoo.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>

authored by

João Paredes and committed by
Dave Kleikamp
679330e4 ca5848ae

+2 -1
+2 -1
fs/jfs/jfs_mount.c
··· 378 378 sbi->nbperpage = PSIZE >> sbi->l2bsize; 379 379 sbi->l2nbperpage = L2PSIZE - sbi->l2bsize; 380 380 sbi->l2niperblk = sbi->l2bsize - L2DISIZE; 381 + uuid_copy(&sbi->uuid, &j_sb->s_uuid); 382 + 381 383 if (sbi->mntflag & JFS_INLINELOG) 382 384 sbi->logpxd = j_sb->s_logpxd; 383 385 else { 384 386 sbi->logdev = new_decode_dev(le32_to_cpu(j_sb->s_logdev)); 385 - uuid_copy(&sbi->uuid, &j_sb->s_uuid); 386 387 uuid_copy(&sbi->loguuid, &j_sb->s_loguuid); 387 388 } 388 389 sbi->fsckpxd = j_sb->s_fsckpxd;