[PATCH 18/59] CRED: Wrap task credential accesses in the BFS filesystem

David Howells
2008-08-27T13:55:48Z

Cc: Tigran A. Aivazian <tigran@aivazian.fsnet.co.uk>
---

fs/bfs/dir.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c
index 87ee5cc..e892a71 100644
--- a/fs/bfs/dir.c
+++ b/fs/bfs/dir.c
@@ -105,8 +105,8 @@ static int bfs_create(struct inode *dir, struct dentry *dentry, int mode,
}
set_bit(ino, info->si_imap);
info->si_freei--;
- inode->i_uid = current->fsuid;
- inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid;
+ inode->i_uid = current_fsuid();
+ inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current_fsgid();
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
inode->i_blocks = 0;
inode->i_op = &bfs_file_inops;