From c968264af7d18b87291805bea07ec06fb2bc1885 Mon Sep 17 00:00:00 2001 From: TARUISI Hiroaki Date: Thu, 12 Nov 2009 07:14:26 +0000 Subject: [PATCH] --- yaml --- r: 177846 b: refs/heads/master c: 4a8be425a8fb8fbb5d881eb55fa6634c3463b9c9 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/btrfs/inode.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3c4723715a7d..a75f840e2c43 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a7a3f7cadd9bdee569243f7ead9550aa16b60e07 +refs/heads/master: 4a8be425a8fb8fbb5d881eb55fa6634c3463b9c9 diff --git a/trunk/fs/btrfs/inode.c b/trunk/fs/btrfs/inode.c index 168e8c040aab..da76cad92ecf 100644 --- a/trunk/fs/btrfs/inode.c +++ b/trunk/fs/btrfs/inode.c @@ -4462,6 +4462,10 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir, if (inode->i_nlink == 0) return -ENOENT; + /* do not allow sys_link's with other subvols of the same device */ + if (root->objectid != BTRFS_I(inode)->root->objectid) + return -EPERM; + /* * 1 item for inode ref * 2 items for dir items