lkml.org 
[lkml]   [2007]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRFC: permit link(2) to work across --bind mounts ?
    Why does link(2) not support hard-linking across bind mount points
    of the same underlying filesystem ?

    Is it as simple as something like this patch below (minus the printk)?
    Not likely, but then I'm not a filesystem guru.

    ???

    --- old/fs/namei.c 2007-12-15 12:33:13.000000000 -0500
    +++ linux/fs/namei.c 2007-12-18 17:37:04.000000000 -0500
    @@ -2398,8 +2398,11 @@
    if (error)
    goto out;
    error = -EXDEV;
    - if (old_nd.mnt != nd.mnt)
    - goto out_release;
    + if (old_nd.mnt != nd.mnt) {
    + if (old_nd.mnt->mnt_sb != nd.mnt->mnt_sb)
    + goto out_release;
    + printk("sys_linkat: old_nd.mnt != nd.mnt, but sb is the same. Continuing..\n");
    + }
    new_dentry = lookup_create(&nd, 0);
    error = PTR_ERR(new_dentry);
    if (IS_ERR(new_dentry))

    \
     
     \ /
      Last update: 2007-12-18 23:49    [W:0.031 / U:61.948 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site