hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/fs/overlayfs/inode.c
....@@ -1,10 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 *
34 * Copyright (C) 2011 Novell Inc.
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms of the GNU General Public License version 2 as published by
7
- * the Free Software Foundation.
85 */
96
107 #include <linux/fs.h>
....@@ -13,6 +10,7 @@
1310 #include <linux/xattr.h>
1411 #include <linux/posix_acl.h>
1512 #include <linux/ratelimit.h>
13
+#include <linux/fiemap.h>
1614 #include "overlayfs.h"
1715
1816
....@@ -61,10 +59,28 @@
6159 if (attr->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID))
6260 attr->ia_valid &= ~ATTR_MODE;
6361
62
+ /*
63
+ * We might have to translate ovl file into real file object
64
+ * once use cases emerge. For now, simply don't let underlying
65
+ * filesystem rely on attr->ia_file
66
+ */
67
+ attr->ia_valid &= ~ATTR_FILE;
68
+
69
+ /*
70
+ * If open(O_TRUNC) is done, VFS calls ->setattr with ATTR_OPEN
71
+ * set. Overlayfs does not pass O_TRUNC flag to underlying
72
+ * filesystem during open -> do not pass ATTR_OPEN. This
73
+ * disables optimization in fuse which assumes open(O_TRUNC)
74
+ * already set file size to 0. But we never passed O_TRUNC to
75
+ * fuse. So by clearing ATTR_OPEN, fuse will be forced to send
76
+ * setattr request to server.
77
+ */
78
+ attr->ia_valid &= ~ATTR_OPEN;
79
+
6480 inode_lock(upperdentry->d_inode);
6581 old_cred = ovl_override_creds(dentry->d_sb);
6682 err = notify_change(upperdentry, attr, NULL);
67
- ovl_revert_creds(old_cred);
83
+ ovl_revert_creds(dentry->d_sb, old_cred);
6884 if (!err)
6985 ovl_copyattr(upperdentry->d_inode, dentry->d_inode);
7086 inode_unlock(upperdentry->d_inode);
....@@ -78,11 +94,11 @@
7894 return err;
7995 }
8096
81
-static int ovl_map_dev_ino(struct dentry *dentry, struct kstat *stat,
82
- struct ovl_layer *lower_layer)
97
+static int ovl_map_dev_ino(struct dentry *dentry, struct kstat *stat, int fsid)
8398 {
84
- bool samefs = ovl_same_sb(dentry->d_sb);
99
+ bool samefs = ovl_same_fs(dentry->d_sb);
85100 unsigned int xinobits = ovl_xino_bits(dentry->d_sb);
101
+ unsigned int xinoshift = 64 - xinobits;
86102
87103 if (samefs) {
88104 /*
....@@ -93,24 +109,22 @@
93109 stat->dev = dentry->d_sb->s_dev;
94110 return 0;
95111 } else if (xinobits) {
96
- unsigned int shift = 64 - xinobits;
97112 /*
98113 * All inode numbers of underlying fs should not be using the
99114 * high xinobits, so we use high xinobits to partition the
100115 * overlay st_ino address space. The high bits holds the fsid
101
- * (upper fsid is 0). This way overlay inode numbers are unique
102
- * and all inodes use overlay st_dev. Inode numbers are also
103
- * persistent for a given layer configuration.
116
+ * (upper fsid is 0). The lowest xinobit is reserved for mapping
117
+ * the non-peresistent inode numbers range in case of overflow.
118
+ * This way all overlay inode numbers are unique and use the
119
+ * overlay st_dev.
104120 */
105
- if (stat->ino >> shift) {
106
- pr_warn_ratelimited("overlayfs: inode number too big (%pd2, ino=%llu, xinobits=%d)\n",
107
- dentry, stat->ino, xinobits);
108
- } else {
109
- if (lower_layer)
110
- stat->ino |= ((u64)lower_layer->fsid) << shift;
111
-
121
+ if (likely(!(stat->ino >> xinoshift))) {
122
+ stat->ino |= ((u64)fsid) << (xinoshift + 1);
112123 stat->dev = dentry->d_sb->s_dev;
113124 return 0;
125
+ } else if (ovl_xino_warn(dentry->d_sb)) {
126
+ pr_warn_ratelimited("inode number too big (%pd2, ino=%llu, xinobits=%d)\n",
127
+ dentry, stat->ino, xinobits);
114128 }
115129 }
116130
....@@ -127,15 +141,14 @@
127141 */
128142 stat->dev = dentry->d_sb->s_dev;
129143 stat->ino = dentry->d_inode->i_ino;
130
- } else if (lower_layer && lower_layer->fsid) {
144
+ } else {
131145 /*
132146 * For non-samefs setup, if we cannot map all layers st_ino
133147 * to a unified address space, we need to make sure that st_dev
134
- * is unique per lower fs. Upper layer uses real st_dev and
135
- * lower layers use the unique anonymous bdev assigned to the
136
- * lower fs.
148
+ * is unique per underlying fs, so we use the unique anonymous
149
+ * bdev assigned to the underlying fs.
137150 */
138
- stat->dev = lower_layer->fs->pseudo_dev;
151
+ stat->dev = OVL_FS(dentry->d_sb)->fs[fsid].pseudo_dev;
139152 }
140153
141154 return 0;
....@@ -149,8 +162,7 @@
149162 struct path realpath;
150163 const struct cred *old_cred;
151164 bool is_dir = S_ISDIR(dentry->d_inode->i_mode);
152
- bool samefs = ovl_same_sb(dentry->d_sb);
153
- struct ovl_layer *lower_layer = NULL;
165
+ int fsid = 0;
154166 int err;
155167 bool metacopy_blocks = false;
156168
....@@ -171,9 +183,9 @@
171183 * If lower filesystem supports NFS file handles, this also guaranties
172184 * persistent st_ino across mount cycle.
173185 */
174
- if (!is_dir || samefs || ovl_xino_bits(dentry->d_sb)) {
186
+ if (!is_dir || ovl_same_dev(dentry->d_sb)) {
175187 if (!OVL_TYPE_UPPER(type)) {
176
- lower_layer = ovl_layer_lower(dentry);
188
+ fsid = ovl_layer_lower(dentry)->fsid;
177189 } else if (OVL_TYPE_ORIGIN(type)) {
178190 struct kstat lowerstat;
179191 u32 lowermask = STATX_INO | STATX_BLOCKS |
....@@ -203,14 +215,8 @@
203215 if (ovl_test_flag(OVL_INDEX, d_inode(dentry)) ||
204216 (!ovl_verify_lower(dentry->d_sb) &&
205217 (is_dir || lowerstat.nlink == 1))) {
206
- lower_layer = ovl_layer_lower(dentry);
207
- /*
208
- * Cannot use origin st_dev;st_ino because
209
- * origin inode content may differ from overlay
210
- * inode content.
211
- */
212
- if (samefs || lower_layer->fsid)
213
- stat->ino = lowerstat.ino;
218
+ fsid = ovl_layer_lower(dentry)->fsid;
219
+ stat->ino = lowerstat.ino;
214220 }
215221
216222 /*
....@@ -244,7 +250,7 @@
244250 }
245251 }
246252
247
- err = ovl_map_dev_ino(dentry, stat, lower_layer);
253
+ err = ovl_map_dev_ino(dentry, stat, fsid);
248254 if (err)
249255 goto out;
250256
....@@ -266,7 +272,7 @@
266272 stat->nlink = dentry->d_inode->i_nlink;
267273
268274 out:
269
- ovl_revert_creds(old_cred);
275
+ ovl_revert_creds(dentry->d_sb, old_cred);
270276
271277 return err;
272278 }
....@@ -300,7 +306,7 @@
300306 mask |= MAY_READ;
301307 }
302308 err = inode_permission(realinode, mask);
303
- ovl_revert_creds(old_cred);
309
+ ovl_revert_creds(inode->i_sb, old_cred);
304310
305311 return err;
306312 }
....@@ -317,11 +323,11 @@
317323
318324 old_cred = ovl_override_creds(dentry->d_sb);
319325 p = vfs_get_link(ovl_dentry_real(dentry), done);
320
- ovl_revert_creds(old_cred);
326
+ ovl_revert_creds(dentry->d_sb, old_cred);
321327 return p;
322328 }
323329
324
-bool ovl_is_private_xattr(const char *name)
330
+bool ovl_is_private_xattr(struct super_block *sb, const char *name)
325331 {
326332 return strncmp(name, OVL_XATTR_PREFIX,
327333 sizeof(OVL_XATTR_PREFIX) - 1) == 0;
....@@ -362,7 +368,7 @@
362368 WARN_ON(flags != XATTR_REPLACE);
363369 err = vfs_removexattr(realdentry, name);
364370 }
365
- ovl_revert_creds(old_cred);
371
+ ovl_revert_creds(dentry->d_sb, old_cred);
366372
367373 /* copy c/mtime */
368374 ovl_copyattr(d_inode(realdentry), inode);
....@@ -373,23 +379,8 @@
373379 return err;
374380 }
375381
376
-int __ovl_xattr_get(struct dentry *dentry, struct inode *inode,
377
- const char *name, void *value, size_t size)
378
-{
379
- ssize_t res;
380
- const struct cred *old_cred;
381
- struct dentry *realdentry =
382
- ovl_i_dentry_upper(inode) ?: ovl_dentry_lower(dentry);
383
-
384
- old_cred = ovl_override_creds(dentry->d_sb);
385
- res = __vfs_getxattr(realdentry, d_inode(realdentry), name, value,
386
- size);
387
- ovl_revert_creds(old_cred);
388
- return res;
389
-}
390
-
391382 int ovl_xattr_get(struct dentry *dentry, struct inode *inode, const char *name,
392
- void *value, size_t size)
383
+ void *value, size_t size, int flags)
393384 {
394385 ssize_t res;
395386 const struct cred *old_cred;
....@@ -397,20 +388,24 @@
397388 ovl_i_dentry_upper(inode) ?: ovl_dentry_lower(dentry);
398389
399390 old_cred = ovl_override_creds(dentry->d_sb);
400
- res = vfs_getxattr(realdentry, name, value, size);
401
- ovl_revert_creds(old_cred);
391
+ res = __vfs_getxattr(realdentry, d_inode(realdentry), name,
392
+ value, size, flags);
393
+ ovl_revert_creds(dentry->d_sb, old_cred);
402394 return res;
403395 }
404396
405
-static bool ovl_can_list(const char *s)
397
+static bool ovl_can_list(struct super_block *sb, const char *s)
406398 {
399
+ /* Never list private (.overlay) */
400
+ if (ovl_is_private_xattr(sb, s))
401
+ return false;
402
+
407403 /* List all non-trusted xatts */
408404 if (strncmp(s, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) != 0)
409405 return true;
410406
411
- /* Never list trusted.overlay, list other trusted for superuser only */
412
- return !ovl_is_private_xattr(s) &&
413
- ns_capable_noaudit(&init_user_ns, CAP_SYS_ADMIN);
407
+ /* list other trusted for superuser only */
408
+ return ns_capable_noaudit(&init_user_ns, CAP_SYS_ADMIN);
414409 }
415410
416411 ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size)
....@@ -423,7 +418,7 @@
423418
424419 old_cred = ovl_override_creds(dentry->d_sb);
425420 res = vfs_listxattr(realdentry, list, size);
426
- ovl_revert_creds(old_cred);
421
+ ovl_revert_creds(dentry->d_sb, old_cred);
427422 if (res <= 0 || size == 0)
428423 return res;
429424
....@@ -436,7 +431,7 @@
436431 return -EIO;
437432
438433 len -= slen;
439
- if (!ovl_can_list(s)) {
434
+ if (!ovl_can_list(dentry->d_sb, s)) {
440435 res -= slen;
441436 memmove(s, s + slen, len);
442437 } else {
....@@ -458,7 +453,7 @@
458453
459454 old_cred = ovl_override_creds(inode->i_sb);
460455 acl = get_acl(realinode, type);
461
- ovl_revert_creds(old_cred);
456
+ ovl_revert_creds(inode->i_sb, old_cred);
462457
463458 return acl;
464459 }
....@@ -468,7 +463,7 @@
468463 if (flags & S_ATIME) {
469464 struct ovl_fs *ofs = inode->i_sb->s_fs_info;
470465 struct path upperpath = {
471
- .mnt = ofs->upper_mnt,
466
+ .mnt = ovl_upper_mnt(ofs),
472467 .dentry = ovl_upperdentry_dereference(OVL_I(inode)),
473468 };
474469
....@@ -491,12 +486,8 @@
491486 return -EOPNOTSUPP;
492487
493488 old_cred = ovl_override_creds(inode->i_sb);
494
-
495
- if (fieinfo->fi_flags & FIEMAP_FLAG_SYNC)
496
- filemap_write_and_wait(realinode->i_mapping);
497
-
498489 err = realinode->i_op->fiemap(realinode, fieinfo, start, len);
499
- ovl_revert_creds(old_cred);
490
+ ovl_revert_creds(inode->i_sb, old_cred);
500491
501492 return err;
502493 }
....@@ -535,7 +526,7 @@
535526
536527 /*
537528 * It is possible to stack overlayfs instance on top of another
538
- * overlayfs instance as lower layer. We need to annonate the
529
+ * overlayfs instance as lower layer. We need to annotate the
539530 * stackable i_mutex locks according to stack level of the super
540531 * block instance. An overlayfs instance can never be in stack
541532 * depth 0 (there is always a real fs below it). An overlayfs
....@@ -547,6 +538,27 @@
547538 * [...] &ovl_i_mutex_dir_key[depth] (stack_depth=2)
548539 * [...] &ovl_i_mutex_dir_key[depth]#2 (stack_depth=1)
549540 * [...] &type->i_mutex_dir_key (stack_depth=0)
541
+ *
542
+ * Locking order w.r.t ovl_want_write() is important for nested overlayfs.
543
+ *
544
+ * This chain is valid:
545
+ * - inode->i_rwsem (inode_lock[2])
546
+ * - upper_mnt->mnt_sb->s_writers (ovl_want_write[0])
547
+ * - OVL_I(inode)->lock (ovl_inode_lock[2])
548
+ * - OVL_I(lowerinode)->lock (ovl_inode_lock[1])
549
+ *
550
+ * And this chain is valid:
551
+ * - inode->i_rwsem (inode_lock[2])
552
+ * - OVL_I(inode)->lock (ovl_inode_lock[2])
553
+ * - lowerinode->i_rwsem (inode_lock[1])
554
+ * - OVL_I(lowerinode)->lock (ovl_inode_lock[1])
555
+ *
556
+ * But lowerinode->i_rwsem SHOULD NOT be acquired while ovl_want_write() is
557
+ * held, because it is in reverse order of the non-nested case using the same
558
+ * upper fs:
559
+ * - inode->i_rwsem (inode_lock[1])
560
+ * - upper_mnt->mnt_sb->s_writers (ovl_want_write[0])
561
+ * - OVL_I(inode)->lock (ovl_inode_lock[1])
550562 */
551563 #define OVL_MAX_NESTING FILESYSTEM_MAX_STACK_DEPTH
552564
....@@ -571,27 +583,73 @@
571583 #endif
572584 }
573585
574
-static void ovl_fill_inode(struct inode *inode, umode_t mode, dev_t rdev,
575
- unsigned long ino, int fsid)
586
+static void ovl_next_ino(struct inode *inode)
587
+{
588
+ struct ovl_fs *ofs = inode->i_sb->s_fs_info;
589
+
590
+ inode->i_ino = atomic_long_inc_return(&ofs->last_ino);
591
+ if (unlikely(!inode->i_ino))
592
+ inode->i_ino = atomic_long_inc_return(&ofs->last_ino);
593
+}
594
+
595
+static void ovl_map_ino(struct inode *inode, unsigned long ino, int fsid)
576596 {
577597 int xinobits = ovl_xino_bits(inode->i_sb);
598
+ unsigned int xinoshift = 64 - xinobits;
578599
579600 /*
580601 * When d_ino is consistent with st_ino (samefs or i_ino has enough
581602 * bits to encode layer), set the same value used for st_ino to i_ino,
582603 * so inode number exposed via /proc/locks and a like will be
583604 * consistent with d_ino and st_ino values. An i_ino value inconsistent
584
- * with d_ino also causes nfsd readdirplus to fail. When called from
585
- * ovl_new_inode(), ino arg is 0, so i_ino will be updated to real
586
- * upper inode i_ino on ovl_inode_init() or ovl_inode_update().
605
+ * with d_ino also causes nfsd readdirplus to fail.
587606 */
588
- if (ovl_same_sb(inode->i_sb) || xinobits) {
589
- inode->i_ino = ino;
590
- if (xinobits && fsid && !(ino >> (64 - xinobits)))
591
- inode->i_ino |= (unsigned long)fsid << (64 - xinobits);
592
- } else {
593
- inode->i_ino = get_next_ino();
607
+ inode->i_ino = ino;
608
+ if (ovl_same_fs(inode->i_sb)) {
609
+ return;
610
+ } else if (xinobits && likely(!(ino >> xinoshift))) {
611
+ inode->i_ino |= (unsigned long)fsid << (xinoshift + 1);
612
+ return;
594613 }
614
+
615
+ /*
616
+ * For directory inodes on non-samefs with xino disabled or xino
617
+ * overflow, we allocate a non-persistent inode number, to be used for
618
+ * resolving st_ino collisions in ovl_map_dev_ino().
619
+ *
620
+ * To avoid ino collision with legitimate xino values from upper
621
+ * layer (fsid 0), use the lowest xinobit to map the non
622
+ * persistent inode numbers to the unified st_ino address space.
623
+ */
624
+ if (S_ISDIR(inode->i_mode)) {
625
+ ovl_next_ino(inode);
626
+ if (xinobits) {
627
+ inode->i_ino &= ~0UL >> xinobits;
628
+ inode->i_ino |= 1UL << xinoshift;
629
+ }
630
+ }
631
+}
632
+
633
+void ovl_inode_init(struct inode *inode, struct ovl_inode_params *oip,
634
+ unsigned long ino, int fsid)
635
+{
636
+ struct inode *realinode;
637
+
638
+ if (oip->upperdentry)
639
+ OVL_I(inode)->__upperdentry = oip->upperdentry;
640
+ if (oip->lowerpath && oip->lowerpath->dentry)
641
+ OVL_I(inode)->lower = igrab(d_inode(oip->lowerpath->dentry));
642
+ if (oip->lowerdata)
643
+ OVL_I(inode)->lowerdata = igrab(d_inode(oip->lowerdata));
644
+
645
+ realinode = ovl_inode_real(inode);
646
+ ovl_copyattr(realinode, inode);
647
+ ovl_copyflags(realinode, inode);
648
+ ovl_map_ino(inode, ino, fsid);
649
+}
650
+
651
+static void ovl_fill_inode(struct inode *inode, umode_t mode, dev_t rdev)
652
+{
595653 inode->i_mode = mode;
596654 inode->i_flags |= S_NOCMTIME;
597655 #ifdef CONFIG_FS_POSIX_ACL
....@@ -670,8 +728,8 @@
670728 if (WARN_ON(len >= sizeof(buf)))
671729 return -EIO;
672730
673
- return ovl_do_setxattr(ovl_dentry_upper(dentry),
674
- OVL_XATTR_NLINK, buf, len, 0);
731
+ return ovl_do_setxattr(OVL_FS(inode->i_sb), ovl_dentry_upper(dentry),
732
+ OVL_XATTR_NLINK, buf, len);
675733 }
676734
677735 int ovl_set_nlink_upper(struct dentry *dentry)
....@@ -684,7 +742,7 @@
684742 return ovl_set_nlink_common(dentry, ovl_dentry_lower(dentry), "L%+i");
685743 }
686744
687
-unsigned int ovl_get_nlink(struct dentry *lowerdentry,
745
+unsigned int ovl_get_nlink(struct ovl_fs *ofs, struct dentry *lowerdentry,
688746 struct dentry *upperdentry,
689747 unsigned int fallback)
690748 {
....@@ -696,7 +754,8 @@
696754 if (!lowerdentry || !upperdentry || d_inode(lowerdentry)->i_nlink == 1)
697755 return fallback;
698756
699
- err = vfs_getxattr(upperdentry, OVL_XATTR_NLINK, &buf, sizeof(buf) - 1);
757
+ err = ovl_do_getxattr(ofs, upperdentry, OVL_XATTR_NLINK,
758
+ &buf, sizeof(buf) - 1);
700759 if (err < 0)
701760 goto fail;
702761
....@@ -718,7 +777,7 @@
718777 return nlink;
719778
720779 fail:
721
- pr_warn_ratelimited("overlayfs: failed to get index nlink (%pd2, err=%i)\n",
780
+ pr_warn_ratelimited("failed to get index nlink (%pd2, err=%i)\n",
722781 upperdentry, err);
723782 return fallback;
724783 }
....@@ -729,7 +788,7 @@
729788
730789 inode = new_inode(sb);
731790 if (inode)
732
- ovl_fill_inode(inode, mode, rdev, 0, 0);
791
+ ovl_fill_inode(inode, mode, rdev);
733792
734793 return inode;
735794 }
....@@ -853,7 +912,7 @@
853912 * Does overlay inode need to be hashed by lower inode?
854913 */
855914 static bool ovl_hash_bylower(struct super_block *sb, struct dentry *upper,
856
- struct dentry *lower, struct dentry *index)
915
+ struct dentry *lower, bool index)
857916 {
858917 struct ovl_fs *ofs = sb->s_fs_info;
859918
....@@ -866,7 +925,7 @@
866925 return true;
867926
868927 /* Yes, if won't be copied up */
869
- if (!ofs->upper_mnt)
928
+ if (!ovl_upper_mnt(ofs))
870929 return true;
871930
872931 /* No, if lower hardlink is or will be broken on copy up */
....@@ -894,6 +953,7 @@
894953 struct inode *ovl_get_inode(struct super_block *sb,
895954 struct ovl_inode_params *oip)
896955 {
956
+ struct ovl_fs *ofs = OVL_FS(sb);
897957 struct dentry *upperdentry = oip->upperdentry;
898958 struct ovl_path *lowerpath = oip->lowerpath;
899959 struct inode *realinode = upperdentry ? d_inode(upperdentry) : NULL;
....@@ -902,7 +962,7 @@
902962 bool bylower = ovl_hash_bylower(sb, upperdentry, lowerdentry,
903963 oip->index);
904964 int fsid = bylower ? lowerpath->layer->fsid : 0;
905
- bool is_dir, metacopy = false;
965
+ bool is_dir;
906966 unsigned long ino = 0;
907967 int err = oip->newinode ? -EEXIST : -ENOMEM;
908968
....@@ -941,7 +1001,8 @@
9411001
9421002 /* Recalculate nlink for non-dir due to indexing */
9431003 if (!is_dir)
944
- nlink = ovl_get_nlink(lowerdentry, upperdentry, nlink);
1004
+ nlink = ovl_get_nlink(ofs, lowerdentry, upperdentry,
1005
+ nlink);
9451006 set_nlink(inode, nlink);
9461007 ino = key->i_ino;
9471008 } else {
....@@ -954,23 +1015,14 @@
9541015 ino = realinode->i_ino;
9551016 fsid = lowerpath->layer->fsid;
9561017 }
957
- ovl_fill_inode(inode, realinode->i_mode, realinode->i_rdev, ino, fsid);
958
- ovl_inode_init(inode, upperdentry, lowerdentry, oip->lowerdata);
1018
+ ovl_fill_inode(inode, realinode->i_mode, realinode->i_rdev);
1019
+ ovl_inode_init(inode, oip, ino, fsid);
9591020
960
- if (upperdentry && ovl_is_impuredir(upperdentry))
1021
+ if (upperdentry && ovl_is_impuredir(sb, upperdentry))
9611022 ovl_set_flag(OVL_IMPURE, inode);
9621023
9631024 if (oip->index)
9641025 ovl_set_flag(OVL_INDEX, inode);
965
-
966
- if (upperdentry) {
967
- err = ovl_check_metacopy_xattr(upperdentry);
968
- if (err < 0)
969
- goto out_err;
970
- metacopy = err;
971
- if (!metacopy)
972
- ovl_set_flag(OVL_UPPERDATA, inode);
973
- }
9741026
9751027 OVL_I(inode)->redirect = oip->redirect;
9761028
....@@ -980,7 +1032,7 @@
9801032 /* Check for non-merge dir that may have whiteouts */
9811033 if (is_dir) {
9821034 if (((upperdentry && lowerdentry) || oip->numlower > 1) ||
983
- ovl_check_origin_xattr(upperdentry ?: lowerdentry)) {
1035
+ ovl_check_origin_xattr(ofs, upperdentry ?: lowerdentry)) {
9841036 ovl_set_flag(OVL_WHITEOUTS, inode);
9851037 }
9861038 }
....@@ -991,7 +1043,7 @@
9911043 return inode;
9921044
9931045 out_err:
994
- pr_warn_ratelimited("overlayfs: failed to get inode (%i)\n", err);
1046
+ pr_warn_ratelimited("failed to get inode (%i)\n", err);
9951047 inode = ERR_PTR(err);
9961048 goto out;
9971049 }