lkml.org 
[lkml]   [2009]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 5/5] tmpfs, support pathconf(3) with _PC_LINK_MAX
Date
Return the value via struct statfs.f_spare[0].
Actually tmpfs doesn't check the link count in link(2) and it can be
wrap around. Set LINK_MAX_UNLIMITED.

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
---
mm/shmem.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/mm/shmem.c b/mm/shmem.c
index 356dd99..78f7e21 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1784,6 +1784,7 @@ static int shmem_statfs(struct dentry *dentry, struct kstatfs *buf)
buf->f_type = TMPFS_MAGIC;
buf->f_bsize = PAGE_CACHE_SIZE;
buf->f_namelen = NAME_MAX;
+ buf->f_linkmax = LINK_MAX_UNLIMITED;
spin_lock(&sbinfo->stat_lock);
if (sbinfo->max_blocks) {
buf->f_blocks = sbinfo->max_blocks;
--
1.6.1.284.g5dc13


\
 
 \ /
  Last update: 2009-12-06 09:03    [W:0.056 / U:3.244 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site