Skip to content

Commit 9022ca6

Browse files
committed
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc vfs updates from Al Viro: "Assorted stuff, including Christoph's I_DIRTY patches" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: move I_DIRTY_INODE to fs.h ubifs: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) call ntfs: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) call gfs2: fix bogus __mark_inode_dirty(I_DIRTY_SYNC | I_DIRTY_DATASYNC) calls fs: fold open_check_o_direct into do_dentry_open vfs: Replace stray non-ASCII homoglyph characters with their ASCII equivalents vfs: make sure struct filename->iname is word-aligned get rid of pointless includes of fs_struct.h [poll] annotate SAA6588_CMD_POLL users
2 parents 38c2368 + 0e11f64 commit 9022ca6

22 files changed

Lines changed: 46 additions & 65 deletions

File tree

‎arch/arc/kernel/troubleshoot.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <linux/mm.h>
1111
#include <linux/fs.h>
1212
#include <linux/kdev_t.h>
13-
#include <linux/fs_struct.h>
1413
#include <linux/proc_fs.h>
1514
#include <linux/file.h>
1615
#include <linux/sched/mm.h>

‎drivers/media/i2c/saa6588.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,9 @@ static long saa6588_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
411411
break;
412412
/* --- poll() for /dev/radio --- */
413413
case SAA6588_CMD_POLL:
414-
a->result = 0;
414+
a->poll_mask = 0;
415415
if (s->data_available_for_read)
416-
a->result |= EPOLLIN | EPOLLRDNORM;
416+
a->poll_mask |= EPOLLIN | EPOLLRDNORM;
417417
poll_wait(a->instance, &s->read_queue, a->event_list);
418418
break;
419419

‎drivers/media/pci/bt8xx/bttv-driver.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3344,10 +3344,10 @@ static __poll_t radio_poll(struct file *file, poll_table *wait)
33443344
radio_enable(btv);
33453345
cmd.instance = file;
33463346
cmd.event_list = wait;
3347-
cmd.result = res;
3347+
cmd.poll_mask = res;
33483348
bttv_call_all(btv, core, ioctl, SAA6588_CMD_POLL, &cmd);
33493349

3350-
return cmd.result;
3350+
return cmd.poll_mask;
33513351
}
33523352

33533353
static const struct v4l2_file_operations radio_fops =

‎drivers/media/pci/saa7134/saa7134-video.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,12 +1235,12 @@ static __poll_t radio_poll(struct file *file, poll_table *wait)
12351235

12361236
cmd.instance = file;
12371237
cmd.event_list = wait;
1238-
cmd.result = 0;
1238+
cmd.poll_mask = 0;
12391239
mutex_lock(&dev->lock);
12401240
saa_call_all(dev, core, ioctl, SAA6588_CMD_POLL, &cmd);
12411241
mutex_unlock(&dev->lock);
12421242

1243-
return rc | cmd.result;
1243+
return rc | cmd.poll_mask;
12441244
}
12451245

12461246
/* ------------------------------------------------------------------ */

‎fs/ceph/dir.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include <linux/ceph/ceph_debug.h>
33

44
#include <linux/spinlock.h>
5-
#include <linux/fs_struct.h>
65
#include <linux/namei.h>
76
#include <linux/slab.h>
87
#include <linux/sched.h>

‎fs/ext4/inode.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5024,12 +5024,12 @@ static int other_inode_match(struct inode * inode, unsigned long ino,
50245024

50255025
if ((inode->i_ino != ino) ||
50265026
(inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW |
5027-
I_DIRTY_SYNC | I_DIRTY_DATASYNC)) ||
5027+
I_DIRTY_INODE)) ||
50285028
((inode->i_state & I_DIRTY_TIME) == 0))
50295029
return 0;
50305030
spin_lock(&inode->i_lock);
50315031
if (((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW |
5032-
I_DIRTY_SYNC | I_DIRTY_DATASYNC)) == 0) &&
5032+
I_DIRTY_INODE)) == 0) &&
50335033
(inode->i_state & I_DIRTY_TIME)) {
50345034
struct ext4_inode_info *ei = EXT4_I(inode);
50355035

‎fs/fs-writeback.c‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
13431343

13441344
dirty = inode->i_state & I_DIRTY;
13451345
if (inode->i_state & I_DIRTY_TIME) {
1346-
if ((dirty & (I_DIRTY_SYNC | I_DIRTY_DATASYNC)) ||
1346+
if ((dirty & I_DIRTY_INODE) ||
13471347
wbc->sync_mode == WB_SYNC_ALL ||
13481348
unlikely(inode->i_state & I_DIRTY_TIME_EXPIRED) ||
13491349
unlikely(time_after(jiffies,
@@ -2112,7 +2112,6 @@ static noinline void block_dump___mark_inode_dirty(struct inode *inode)
21122112
*/
21132113
void __mark_inode_dirty(struct inode *inode, int flags)
21142114
{
2115-
#define I_DIRTY_INODE (I_DIRTY_SYNC | I_DIRTY_DATASYNC)
21162115
struct super_block *sb = inode->i_sb;
21172116
int dirtytime;
21182117

@@ -2122,7 +2121,7 @@ void __mark_inode_dirty(struct inode *inode, int flags)
21222121
* Don't do this for I_DIRTY_PAGES - that doesn't actually
21232122
* dirty the inode itself
21242123
*/
2125-
if (flags & (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_TIME)) {
2124+
if (flags & (I_DIRTY_INODE | I_DIRTY_TIME)) {
21262125
trace_writeback_dirty_inode_start(inode, flags);
21272126

21282127
if (sb->s_op->dirty_inode)
@@ -2197,7 +2196,7 @@ void __mark_inode_dirty(struct inode *inode, int flags)
21972196
if (dirtytime)
21982197
inode->dirtied_time_when = jiffies;
21992198

2200-
if (inode->i_state & (I_DIRTY_INODE | I_DIRTY_PAGES))
2199+
if (inode->i_state & I_DIRTY)
22012200
dirty_list = &wb->b_dirty;
22022201
else
22032202
dirty_list = &wb->b_dirty_time;
@@ -2221,8 +2220,6 @@ void __mark_inode_dirty(struct inode *inode, int flags)
22212220
}
22222221
out_unlock_inode:
22232222
spin_unlock(&inode->i_lock);
2224-
2225-
#undef I_DIRTY_INODE
22262223
}
22272224
EXPORT_SYMBOL(__mark_inode_dirty);
22282225

‎fs/gfs2/super.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ static void gfs2_dirty_inode(struct inode *inode, int flags)
800800
int need_endtrans = 0;
801801
int ret;
802802

803-
if (!(flags & (I_DIRTY_DATASYNC|I_DIRTY_SYNC)))
803+
if (!(flags & I_DIRTY_INODE))
804804
return;
805805
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
806806
return;

‎fs/gfs2/xattr.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ static int ea_dealloc_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh,
308308
}
309309

310310
ip->i_inode.i_ctime = current_time(&ip->i_inode);
311-
__mark_inode_dirty(&ip->i_inode, I_DIRTY_SYNC | I_DIRTY_DATASYNC);
311+
__mark_inode_dirty(&ip->i_inode, I_DIRTY_DATASYNC);
312312

313313
gfs2_trans_end(sdp);
314314

@@ -768,7 +768,7 @@ static int ea_alloc_skeleton(struct gfs2_inode *ip, struct gfs2_ea_request *er,
768768
goto out_end_trans;
769769

770770
ip->i_inode.i_ctime = current_time(&ip->i_inode);
771-
__mark_inode_dirty(&ip->i_inode, I_DIRTY_SYNC | I_DIRTY_DATASYNC);
771+
__mark_inode_dirty(&ip->i_inode, I_DIRTY_DATASYNC);
772772

773773
out_end_trans:
774774
gfs2_trans_end(GFS2_SB(&ip->i_inode));
@@ -896,7 +896,7 @@ static int ea_set_simple_noalloc(struct gfs2_inode *ip, struct buffer_head *bh,
896896
ea_set_remove_stuffed(ip, es->es_el);
897897

898898
ip->i_inode.i_ctime = current_time(&ip->i_inode);
899-
__mark_inode_dirty(&ip->i_inode, I_DIRTY_SYNC | I_DIRTY_DATASYNC);
899+
__mark_inode_dirty(&ip->i_inode, I_DIRTY_DATASYNC);
900900

901901
gfs2_trans_end(GFS2_SB(&ip->i_inode));
902902
return error;
@@ -1114,7 +1114,7 @@ static int ea_remove_stuffed(struct gfs2_inode *ip, struct gfs2_ea_location *el)
11141114
}
11151115

11161116
ip->i_inode.i_ctime = current_time(&ip->i_inode);
1117-
__mark_inode_dirty(&ip->i_inode, I_DIRTY_SYNC | I_DIRTY_DATASYNC);
1117+
__mark_inode_dirty(&ip->i_inode, I_DIRTY_DATASYNC);
11181118

11191119
gfs2_trans_end(GFS2_SB(&ip->i_inode));
11201120

‎fs/internal.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ int do_fchmodat(int dfd, const char __user *filename, umode_t mode);
125125
int do_fchownat(int dfd, const char __user *filename, uid_t user, gid_t group,
126126
int flag);
127127

128-
extern int open_check_o_direct(struct file *f);
129128
extern int vfs_open(const struct path *, struct file *, const struct cred *);
130129
extern struct file *filp_clone_open(struct file *);
131130

0 commit comments

Comments
 (0)