inode.c (31747eda41ef3c30c09c5c096b380bf54013746a) | inode.c (86eaa13046d5e814484c89f635a95b0342b765ad) |
---|---|
1/* 2 * 3 * 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. 8 */ --- 91 unchanged lines hidden (view full) --- 100 lowermask, flags); 101 if (err) 102 goto out; 103 104 /* 105 * Lower hardlinks may be broken on copy up to different 106 * upper files, so we cannot use the lower origin st_ino 107 * for those different files, even for the same fs case. | 1/* 2 * 3 * 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. 8 */ --- 91 unchanged lines hidden (view full) --- 100 lowermask, flags); 101 if (err) 102 goto out; 103 104 /* 105 * Lower hardlinks may be broken on copy up to different 106 * upper files, so we cannot use the lower origin st_ino 107 * for those different files, even for the same fs case. |
108 * 109 * Similarly, several redirected dirs can point to the 110 * same dir on a lower layer. With the "verify_lower" 111 * feature, we do not use the lower origin st_ino, if 112 * we haven't verified that this redirect is unique. 113 * |
|
108 * With inodes index enabled, it is safe to use st_ino | 114 * With inodes index enabled, it is safe to use st_ino |
109 * of an indexed hardlinked origin. The index validates 110 * that the upper hardlink is not broken. | 115 * of an indexed origin. The index validates that the 116 * upper hardlink is not broken and that a redirected 117 * dir is the only redirect to that origin. |
111 */ | 118 */ |
112 if (is_dir || lowerstat.nlink == 1 || 113 ovl_test_flag(OVL_INDEX, d_inode(dentry))) | 119 if (ovl_test_flag(OVL_INDEX, d_inode(dentry)) || 120 (!ovl_verify_lower(dentry->d_sb) && 121 (is_dir || lowerstat.nlink == 1))) |
114 stat->ino = lowerstat.ino; 115 116 if (samefs) 117 WARN_ON_ONCE(stat->dev != lowerstat.dev); 118 else 119 stat->dev = ovl_get_pseudo_dev(dentry); 120 } 121 if (samefs) { --- 601 unchanged lines hidden --- | 122 stat->ino = lowerstat.ino; 123 124 if (samefs) 125 WARN_ON_ONCE(stat->dev != lowerstat.dev); 126 else 127 stat->dev = ovl_get_pseudo_dev(dentry); 128 } 129 if (samefs) { --- 601 unchanged lines hidden --- |