hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/fs/ocfs2/namei.c
....@@ -198,6 +198,7 @@
198198 * callers. */
199199 if (S_ISDIR(mode))
200200 set_nlink(inode, 2);
201
+ mode = mode_strip_sgid(dir, mode);
201202 inode_init_owner(inode, dir, mode);
202203 status = dquot_initialize(inode);
203204 if (status)
....@@ -241,6 +242,7 @@
241242 int want_meta = 0;
242243 int xattr_credits = 0;
243244 struct ocfs2_security_xattr_info si = {
245
+ .name = NULL,
244246 .enable = 1,
245247 };
246248 int did_quota_inode = 0;
....@@ -1530,6 +1532,10 @@
15301532 status = ocfs2_add_entry(handle, new_dentry, old_inode,
15311533 OCFS2_I(old_inode)->ip_blkno,
15321534 new_dir_bh, &target_insert);
1535
+ if (status < 0) {
1536
+ mlog_errno(status);
1537
+ goto bail;
1538
+ }
15331539 }
15341540
15351541 old_inode->i_ctime = current_time(old_inode);
....@@ -1800,6 +1806,7 @@
18001806 int want_clusters = 0;
18011807 int xattr_credits = 0;
18021808 struct ocfs2_security_xattr_info si = {
1809
+ .name = NULL,
18031810 .enable = 1,
18041811 };
18051812 int did_quota = 0, did_quota_inode = 0;