diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-23 14:16:03 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-23 14:16:03 +0300 |
commit | df1aa5b0d1a69b93d1371063299e42dcc56cbe7b (patch) | |
tree | 8e84f62c45a49099782d0a97f5568b9a43702272 /fs/squashfs/inode.c | |
parent | ebbc1a4789c666846b9854ef845a37a64879e5f9 (diff) | |
parent | ed30a4a51bb196781c8058073ea720133a65596f (diff) | |
download | linux-df1aa5b0d1a69b93d1371063299e42dcc56cbe7b.tar.xz |
Merge 6.9-rc5 into char-misc-next
We need the char/misc fixes in here as well to work off of.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/squashfs/inode.c')
-rw-r--r-- | fs/squashfs/inode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/squashfs/inode.c b/fs/squashfs/inode.c index aa3411354e66..16bd693d0b3a 100644 --- a/fs/squashfs/inode.c +++ b/fs/squashfs/inode.c @@ -48,6 +48,10 @@ static int squashfs_new_inode(struct super_block *sb, struct inode *inode, gid_t i_gid; int err; + inode->i_ino = le32_to_cpu(sqsh_ino->inode_number); + if (inode->i_ino == 0) + return -EINVAL; + err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->uid), &i_uid); if (err) return err; @@ -58,7 +62,6 @@ static int squashfs_new_inode(struct super_block *sb, struct inode *inode, i_uid_write(inode, i_uid); i_gid_write(inode, i_gid); - inode->i_ino = le32_to_cpu(sqsh_ino->inode_number); inode_set_mtime(inode, le32_to_cpu(sqsh_ino->mtime), 0); inode_set_atime(inode, inode_get_mtime_sec(inode), 0); inode_set_ctime(inode, inode_get_mtime_sec(inode), 0); |