/* * linux/fs/affs/symlink.c * * 1995 Hans-Joachim Widmaier - Modified for affs. * * Copyright (C) 1991, 1992 Linus Torvalds * * affs symlink handling code */ #include "affs.h"
static int affs_symlink_readpage(struct file *file, struct page *page) { struct buffer_head *bh; struct inode *inode = page->mapping->host; char *link = page_address(page); struct slink_front *lf; int i, j; char c; char lc; pr_debug("get_link(ino=%lu)\n", inode->i_ino); bh = affs_bread(inode->i_sb, inode->i_ino); if (!bh) goto fail; i = 0; j = 0; lf = (struct slink_front *)bh->b_data; lc = 0; if (strchr(lf->symname,':')) { /* Handle assign or volume name */ struct affs_sb_info *sbi = AFFS_SB(inode->i_sb); char *pf; spin_lock(&sbi->symlink_lock); pf = sbi->s_prefix ? sbi->s_prefix : "/"; while (i < 1023 && (c = pf[i])) link[i++] = c; spin_unlock(&sbi->symlink_lock); while (i < 1023 && lf->symname[j] != ':') link[i++] = lf->symname[j++]; if (i < 1023) link[i++] = '/'; j++; lc = '/'; } while (i < 1023 && (c = lf->symname[j])) { if (c == '/' && lc == '/' && i < 1020) { /* parent dir */ link[i++] = '.'; link[i++] = '.'; } link[i++] = c; lc = c; j++; } link[i] = '\0'; affs_brelse(bh); SetPageUptodate(page); unlock_page(page); return 0; fail: SetPageError(page); unlock_page(page); return -EIO; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 294 | 84.24% | 7 | 50.00% |
Al Viro | 45 | 12.89% | 3 | 21.43% |
Brian Gerst | 5 | 1.43% | 1 | 7.14% |
Andrew Morton | 2 | 0.57% | 1 | 7.14% |
Fabian Frederick | 2 | 0.57% | 1 | 7.14% |
Linus Torvalds | 1 | 0.29% | 1 | 7.14% |
Total | 349 | 100.00% | 14 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 315 | 82.46% | 10 | 45.45% |
Al Viro | 50 | 13.09% | 5 | 22.73% |
Art Haas | 5 | 1.31% | 1 | 4.55% |
Brian Gerst | 5 | 1.31% | 1 | 4.55% |
Andrew Morton | 2 | 0.52% | 1 | 4.55% |
Fabian Frederick | 2 | 0.52% | 1 | 4.55% |
Christoph Hellwig | 1 | 0.26% | 1 | 4.55% |
Linus Torvalds | 1 | 0.26% | 1 | 4.55% |
Arjan van de Ven | 1 | 0.26% | 1 | 4.55% |
Total | 382 | 100.00% | 22 | 100.00% |