Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2

Pull ocfs2 fixes from Joel Becker.

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
aio: make kiocb->private NUll in init_sync_kiocb()
ocfs2: Fix bogus error message from ocfs2_global_read_info
ocfs2: for SEEK_DATA/SEEK_HOLE, return internal error unchanged if ocfs2_get_clusters_nocache() or ocfs2_inode_lock() call failed.
ocfs2: use spinlock irqsave for downconvert lock.patch
ocfs2: Misplaced parens in unlikley
ocfs2: clear unaligned io flag when dio fails

+24 -18
+20 -13
fs/ocfs2/dlmglue.c
··· 456 456 stats->ls_gets++; 457 457 stats->ls_total += ktime_to_ns(kt); 458 458 /* overflow */ 459 - if (unlikely(stats->ls_gets) == 0) { 459 + if (unlikely(stats->ls_gets == 0)) { 460 460 stats->ls_gets++; 461 461 stats->ls_total = ktime_to_ns(kt); 462 462 } ··· 3932 3932 static void ocfs2_schedule_blocked_lock(struct ocfs2_super *osb, 3933 3933 struct ocfs2_lock_res *lockres) 3934 3934 { 3935 + unsigned long flags; 3936 + 3935 3937 assert_spin_locked(&lockres->l_lock); 3936 3938 3937 3939 if (lockres->l_flags & OCFS2_LOCK_FREEING) { ··· 3947 3945 3948 3946 lockres_or_flags(lockres, OCFS2_LOCK_QUEUED); 3949 3947 3950 - spin_lock(&osb->dc_task_lock); 3948 + spin_lock_irqsave(&osb->dc_task_lock, flags); 3951 3949 if (list_empty(&lockres->l_blocked_list)) { 3952 3950 list_add_tail(&lockres->l_blocked_list, 3953 3951 &osb->blocked_lock_list); 3954 3952 osb->blocked_lock_count++; 3955 3953 } 3956 - spin_unlock(&osb->dc_task_lock); 3954 + spin_unlock_irqrestore(&osb->dc_task_lock, flags); 3957 3955 } 3958 3956 3959 3957 static void ocfs2_downconvert_thread_do_work(struct ocfs2_super *osb) 3960 3958 { 3961 3959 unsigned long processed; 3960 + unsigned long flags; 3962 3961 struct ocfs2_lock_res *lockres; 3963 3962 3964 - spin_lock(&osb->dc_task_lock); 3963 + spin_lock_irqsave(&osb->dc_task_lock, flags); 3965 3964 /* grab this early so we know to try again if a state change and 3966 3965 * wake happens part-way through our work */ 3967 3966 osb->dc_work_sequence = osb->dc_wake_sequence; ··· 3975 3972 struct ocfs2_lock_res, l_blocked_list); 3976 3973 list_del_init(&lockres->l_blocked_list); 3977 3974 osb->blocked_lock_count--; 3978 - spin_unlock(&osb->dc_task_lock); 3975 + spin_unlock_irqrestore(&osb->dc_task_lock, flags); 3979 3976 3980 3977 BUG_ON(!processed); 3981 3978 processed--; 3982 3979 3983 3980 ocfs2_process_blocked_lock(osb, lockres); 3984 3981 3985 - spin_lock(&osb->dc_task_lock); 3982 + spin_lock_irqsave(&osb->dc_task_lock, flags); 3986 3983 } 3987 - spin_unlock(&osb->dc_task_lock); 3984 + spin_unlock_irqrestore(&osb->dc_task_lock, flags); 3988 3985 } 3989 3986 3990 3987 static int ocfs2_downconvert_thread_lists_empty(struct ocfs2_super *osb) 3991 3988 { 3992 3989 int empty = 0; 3990 + unsigned long flags; 3993 3991 3994 - spin_lock(&osb->dc_task_lock); 3992 + spin_lock_irqsave(&osb->dc_task_lock, flags); 3995 3993 if (list_empty(&osb->blocked_lock_list)) 3996 3994 empty = 1; 3997 3995 3998 - spin_unlock(&osb->dc_task_lock); 3996 + spin_unlock_irqrestore(&osb->dc_task_lock, flags); 3999 3997 return empty; 4000 3998 } 4001 3999 4002 4000 static int ocfs2_downconvert_thread_should_wake(struct ocfs2_super *osb) 4003 4001 { 4004 4002 int should_wake = 0; 4003 + unsigned long flags; 4005 4004 4006 - spin_lock(&osb->dc_task_lock); 4005 + spin_lock_irqsave(&osb->dc_task_lock, flags); 4007 4006 if (osb->dc_work_sequence != osb->dc_wake_sequence) 4008 4007 should_wake = 1; 4009 - spin_unlock(&osb->dc_task_lock); 4008 + spin_unlock_irqrestore(&osb->dc_task_lock, flags); 4010 4009 4011 4010 return should_wake; 4012 4011 } ··· 4038 4033 4039 4034 void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb) 4040 4035 { 4041 - spin_lock(&osb->dc_task_lock); 4036 + unsigned long flags; 4037 + 4038 + spin_lock_irqsave(&osb->dc_task_lock, flags); 4042 4039 /* make sure the voting thread gets a swipe at whatever changes 4043 4040 * the caller may have made to the voting state */ 4044 4041 osb->dc_wake_sequence++; 4045 - spin_unlock(&osb->dc_task_lock); 4042 + spin_unlock_irqrestore(&osb->dc_task_lock, flags); 4046 4043 wake_up(&osb->dc_event); 4047 4044 }
-2
fs/ocfs2/extent_map.c
··· 923 923 924 924 ocfs2_inode_unlock(inode, 0); 925 925 out: 926 - if (ret && ret != -ENXIO) 927 - ret = -ENXIO; 928 926 return ret; 929 927 } 930 928
+3 -1
fs/ocfs2/file.c
··· 2422 2422 unaligned_dio = 0; 2423 2423 } 2424 2424 2425 - if (unaligned_dio) 2425 + if (unaligned_dio) { 2426 + ocfs2_iocb_clear_unaligned_aio(iocb); 2426 2427 atomic_dec(&OCFS2_I(inode)->ip_unaligned_aio); 2428 + } 2427 2429 2428 2430 out: 2429 2431 if (rw_level != -1)
-2
fs/ocfs2/quota_global.c
··· 399 399 msecs_to_jiffies(oinfo->dqi_syncms)); 400 400 401 401 out_err: 402 - if (status) 403 - mlog_errno(status); 404 402 return status; 405 403 out_unlock: 406 404 ocfs2_unlock_global_qf(oinfo, 0);
+1
include/linux/aio.h
··· 140 140 (x)->ki_dtor = NULL; \ 141 141 (x)->ki_obj.tsk = tsk; \ 142 142 (x)->ki_user_data = 0; \ 143 + (x)->private = NULL; \ 143 144 } while (0) 144 145 145 146 #define AIO_RING_MAGIC 0xa10a10a1