Lines Matching refs:nlink

221 			     (is_dir || lowerstat.nlink == 1))) {
268 * correct link count. nlink=1 seems to pacify 'find' and
272 stat->nlink = 1;
276 * Overlay inode nlink counts the union of the upper hardlinks
281 stat->nlink = dentry->d_inode->i_nlink;
1062 * With inodes index enabled, an overlay inode nlink counts the union of upper
1064 * upper inode, the following nlink modifying operations can happen:
1070 * For the first, copy up case, the union nlink does not change, whether the
1071 * operation succeeds or fails, but the upper inode nlink may change.
1072 * Therefore, before copy up, we store the union nlink value relative to the
1073 * lower inode nlink in the index inode xattr .overlay.nlink.
1075 * For the second, upper hardlink case, the union nlink should be incremented
1076 * or decremented IFF the operation succeeds, aligned with nlink change of the
1077 * upper inode. Therefore, before link/unlink/rename, we store the union nlink
1078 * value relative to the upper inode nlink in the index inode.
1082 * upper inode where the nlink xattr can be stored before the copied up upper
1088 * On-disk format for indexed nlink:
1090 * nlink relative to the upper inode - "U[+-]NUM"
1091 * nlink relative to the lower inode - "L[+-]NUM"
1127 int nlink;
1148 nlink = d_inode(buf[0] == 'L' ? lowerdentry : upperdentry)->i_nlink;
1149 nlink += nlink_diff;
1151 if (nlink <= 0)
1154 return nlink;
1157 pr_warn_ratelimited("failed to get index nlink (%pd2, err=%i)\n",
1361 unsigned int nlink = is_dir ? 1 : realinode->i_nlink;
1385 /* Recalculate nlink for non-dir due to indexing */
1387 nlink = ovl_get_nlink(ofs, lowerdentry, upperdentry,
1388 nlink);
1389 set_nlink(inode, nlink);