Skip to content

Instantly share code, notes, and snippets.

@tenforward
Last active April 9, 2018 11:20
Show Gist options
  • Save tenforward/ab671ac39bbc43930ca5ec4418cbf72e to your computer and use it in GitHub Desktop.
Save tenforward/ab671ac39bbc43930ca5ec4418cbf72e to your computer and use it in GitHub Desktop.
ShiftFS のパッチ
From a4576375661775827570a7e620443ad15a3e6db9 Mon Sep 17 00:00:00 2001
From: KATOH Yasufumi <karma@jazz.email.ne.jp>
Date: Wed, 11 Oct 2017 16:47:24 +0900
Subject: [PATCH 3/3] shiftfs: update to fit d_real of struct dentry_operations
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
---
fs/shiftfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/shiftfs.c b/fs/shiftfs.c
index fbe336c..1fca901 100644
--- a/fs/shiftfs.c
+++ b/fs/shiftfs.c
@@ -109,12 +109,13 @@ static void shiftfs_d_release(struct dentry *dentry)
static struct dentry *shiftfs_d_real(struct dentry *dentry,
const struct inode *inode,
+ unsigned int open_flags,
unsigned int flags)
{
struct dentry *real = dentry->d_fsdata;
if (unlikely(real->d_flags & DCACHE_OP_REAL))
- return real->d_op->d_real(real, real->d_inode, flags);
+ return real->d_op->d_real(real, real->d_inode, open_flags, flags);
return real;
}
--
2.12.2
From 022171fd7f90cfdb5b1238c44f4a2cf2b9c238fe Mon Sep 17 00:00:00 2001
From: KATOH Yasufumi <karma@jazz.email.ne.jp>
Date: Tue, 9 Jan 2018 20:44:34 +0900
Subject: [PATCH] fs/shiftfs: Convert ACCESS_ONCE to READ_ONCE
---
fs/shiftfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/shiftfs.c b/fs/shiftfs.c
index 1fca901..b89fd03 100644
--- a/fs/shiftfs.c
+++ b/fs/shiftfs.c
@@ -628,7 +628,7 @@ static struct inode *shiftfs_new_inode(struct super_block *sb, umode_t mode,
* may be aliases plus a few others.
*/
if (reali)
- use_inode_hash = ACCESS_ONCE(reali->i_nlink) > 1 &&
+ use_inode_hash = READ_ONCE(reali->i_nlink) > 1 &&
!S_ISDIR(reali->i_mode);
if (use_inode_hash) {
--
2.12.2
@tenforward
Copy link
Author

4.16にも適用できます

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment