• Mark Fasheh's avatar
    btrfs: return EXDEV when linking from different subvolumes · 3ab3564f
    Mark Fasheh authored
    btrfs_link returns EPERM if a cross-subvolume link is attempted.
    
    However, in this case I believe EXDEV to be the more appropriate value.
    >From the link(2) man page:
    
    EXDEV  oldpath and newpath are not on the same mounted file system.  (Linux
           permits a file system to be mounted at multiple points, but link()
           does not work across different mount points, even if the same file
           system is mounted on both.)
    
    This matters because an application may have different behaviors based on
    return codes.
    Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    3ab3564f
inode.c 198 KB