Lines Matching defs: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;
938 * With inodes index enabled, an overlay inode nlink counts the union of upper
940 * upper inode, the following nlink modifying operations can happen:
946 * For the first, copy up case, the union nlink does not change, whether the
947 * operation succeeds or fails, but the upper inode nlink may change.
948 * Therefore, before copy up, we store the union nlink value relative to the
949 * lower inode nlink in the index inode xattr .overlay.nlink.
951 * For the second, upper hardlink case, the union nlink should be incremented
952 * or decremented IFF the operation succeeds, aligned with nlink change of the
953 * upper inode. Therefore, before link/unlink/rename, we store the union nlink
954 * value relative to the upper inode nlink in the index inode.
958 * upper inode where the nlink xattr can be stored before the copied up upper
964 * On-disk format for indexed nlink:
966 * nlink relative to the upper inode - "U[+-]NUM"
967 * nlink relative to the lower inode - "L[+-]NUM"
1003 int nlink;
1024 nlink = d_inode(buf[0] == 'L' ? lowerdentry : upperdentry)->i_nlink;
1025 nlink += nlink_diff;
1027 if (nlink <= 0)
1030 return nlink;
1033 pr_warn_ratelimited("failed to get index nlink (%pd2, err=%i)\n",
1237 unsigned int nlink = is_dir ? 1 : realinode->i_nlink;
1261 /* Recalculate nlink for non-dir due to indexing */
1263 nlink = ovl_get_nlink(ofs, lowerdentry, upperdentry,
1264 nlink);
1265 set_nlink(inode, nlink);